1.18.2.0
This commit is contained in:
parent
2f117d21db
commit
dea36b82e9
16
build.gradle
16
build.gradle
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '0.10-SNAPSHOT'
|
||||
id 'fabric-loom' version '0.11-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
@ -40,14 +40,10 @@ processResources {
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
||||
// this fixes some edge cases with special characters not displaying correctly
|
||||
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
||||
// If Javadoc is generated, this must be specified in that task too.
|
||||
it.options.encoding = "UTF-8"
|
||||
|
||||
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
|
||||
it.options.release = 17
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
java {
|
||||
@ -67,13 +63,7 @@ jar {
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
// add all the jars that should be included when publishing to maven
|
||||
artifact(remapJar) {
|
||||
builtBy remapJar
|
||||
}
|
||||
artifact(sourcesJar) {
|
||||
builtBy remapSourcesJar
|
||||
}
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,14 +4,14 @@
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/versions.html
|
||||
minecraft_version=1.18.1
|
||||
yarn_mappings=1.18.1+build.7
|
||||
loader_version=0.12.12
|
||||
minecraft_version=1.18.2
|
||||
yarn_mappings=1.18.2+build.2
|
||||
loader_version=0.13.3
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.18.1.7
|
||||
mod_version = 1.18.2.0
|
||||
maven_group = de.jottyfan.minecraft
|
||||
archives_base_name = quickiefabric
|
||||
|
||||
# Dependencies
|
||||
fabric_version=0.44.0+1.18
|
||||
fabric_version=0.47.10+1.18.2
|
||||
|
@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.items.QuickieItems;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.OreBlock;
|
||||
@ -13,14 +12,14 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext.Builder;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockOreNetherSulphor extends OreBlock {
|
||||
|
||||
public BlockOreNetherSulphor() {
|
||||
super(FabricBlockSettings.of(Material.STONE).hardness(2.1f).requiresTool().breakByTool(FabricToolTags.PICKAXES));
|
||||
super(FabricBlockSettings.of(Material.STONE).hardness(2.1f).requiresTool());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.items.QuickieItems;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.OreBlock;
|
||||
@ -13,14 +12,14 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext.Builder;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockOreSalpeter extends OreBlock {
|
||||
|
||||
public BlockOreSalpeter() {
|
||||
super(FabricBlockSettings.of(Material.STONE).hardness(3.1f).requiresTool().breakByTool(FabricToolTags.PICKAXES));
|
||||
super(FabricBlockSettings.of(Material.STONE).hardness(3.1f).requiresTool());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.items.QuickieItems;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.Material;
|
||||
@ -14,14 +13,14 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext.Builder;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockOreSandSalpeter extends OreBlock {
|
||||
|
||||
public BlockOreSandSalpeter() {
|
||||
super(FabricBlockSettings.of(Material.STONE).hardness(2.9f).requiresTool().breakByTool(FabricToolTags.PICKAXES));
|
||||
super(FabricBlockSettings.of(Material.STONE).hardness(2.9f).requiresTool());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.items.QuickieItems;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.OreBlock;
|
||||
@ -13,14 +12,14 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext.Builder;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockOreSulphor extends OreBlock {
|
||||
|
||||
public BlockOreSulphor() {
|
||||
super(FabricBlockSettings.of(Material.STONE).hardness(1.9f).requiresTool().breakByTool(FabricToolTags.PICKAXES));
|
||||
super(FabricBlockSettings.of(Material.STONE).hardness(1.9f).requiresTool());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.items.QuickieItems;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.GravelBlock;
|
||||
@ -14,14 +13,14 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext.Builder;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockSandSalpeter extends GravelBlock {
|
||||
|
||||
public BlockSandSalpeter() {
|
||||
super(FabricBlockSettings.of(Material.STONE).hardness(3.1f).requiresTool().breakByTool(FabricToolTags.SHOVELS));
|
||||
super(FabricBlockSettings.of(Material.STONE).hardness(3.1f).requiresTool());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.items.QuickieItems;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
@ -13,14 +12,14 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext.Builder;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockSulphor extends Block {
|
||||
|
||||
public BlockSulphor() {
|
||||
super(FabricBlockSettings.of(Material.WOOL).hardness(0.5f).requiresTool().breakByTool(FabricToolTags.PICKAXES));
|
||||
super(FabricBlockSettings.of(Material.WOOL).hardness(0.5f).requiresTool());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -18,7 +18,7 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
@ -47,7 +47,7 @@ public class EventBlockBreak {
|
||||
|
||||
/**
|
||||
* handle the rangeable tools break event
|
||||
*
|
||||
*
|
||||
* @param tool the tool that has been used
|
||||
* @param itemStack the item stack
|
||||
* @param world the world
|
||||
@ -79,7 +79,7 @@ public class EventBlockBreak {
|
||||
|
||||
/**
|
||||
* break block recursively;
|
||||
*
|
||||
*
|
||||
* @param visitedBlocks the positions of visited blocks
|
||||
* @param world the world
|
||||
* @param validBlocks the blocks to break
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.init;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@ -38,23 +39,23 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.structure.rule.BlockMatchRuleTest;
|
||||
import net.minecraft.structure.rule.TagMatchRuleTest;
|
||||
import net.minecraft.tag.BlockTags;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.BuiltinRegistries;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.util.registry.RegistryEntry;
|
||||
import net.minecraft.util.registry.RegistryKey;
|
||||
import net.minecraft.world.gen.GenerationStep;
|
||||
import net.minecraft.world.gen.YOffset;
|
||||
import net.minecraft.world.gen.decorator.CountPlacementModifier;
|
||||
import net.minecraft.world.gen.decorator.HeightRangePlacementModifier;
|
||||
import net.minecraft.world.gen.decorator.SquarePlacementModifier;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.gen.feature.EmeraldOreFeatureConfig;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.OreConfiguredFeatures;
|
||||
import net.minecraft.world.gen.feature.OreFeatureConfig;
|
||||
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||
import net.minecraft.world.gen.placementmodifier.CountPlacementModifier;
|
||||
import net.minecraft.world.gen.placementmodifier.HeightRangePlacementModifier;
|
||||
import net.minecraft.world.gen.placementmodifier.SquarePlacementModifier;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -70,32 +71,44 @@ public class RegistryManager {
|
||||
public static final ScreenHandlerType<BackpackScreenHandler> BACKPACK_SCREEN_HANDLER = ScreenHandlerRegistry
|
||||
.registerExtended(RegistryManager.BACKPACK_IDENTIFIER, BackpackScreenHandler::new);
|
||||
|
||||
public static final ConfiguredFeature<?, ?> CF_ORESULPHOR = Feature.ORE.configure(new OreFeatureConfig(
|
||||
new TagMatchRuleTest(BlockTags.BASE_STONE_OVERWORLD), QuickieBlocks.ORE_SULPHOR.getDefaultState(), 20));
|
||||
public static final ConfiguredFeature<?, ?> CF_ORENETHERSULPHOR = Feature.ORE.configure(new OreFeatureConfig(
|
||||
new TagMatchRuleTest(BlockTags.BASE_STONE_OVERWORLD), QuickieBlocks.ORE_NETHER_SULPHOR.getDefaultState(), 24));
|
||||
public static final ConfiguredFeature<?, ?> CF_ORESALPETER = Feature.ORE.configure(new OreFeatureConfig(
|
||||
new TagMatchRuleTest(BlockTags.BASE_STONE_OVERWORLD), QuickieBlocks.ORE_SALPETER.getDefaultState(), 12));
|
||||
public static final ConfiguredFeature<?, ?> CF_DIRTSALPETER = Feature.ORE.configure(
|
||||
new OreFeatureConfig(new BlockMatchRuleTest(Blocks.DIRT), QuickieBlocks.DIRT_SALPETER.getDefaultState(), 3));
|
||||
public static final ConfiguredFeature<?, ?> CF_SANDSALPETER = Feature.ORE.configure(
|
||||
new OreFeatureConfig(new BlockMatchRuleTest(Blocks.SAND), QuickieBlocks.SAND_SALPETER.getDefaultState(), 3));
|
||||
public static final ConfiguredFeature<?, ?> CF_ORESANDSALPETER = Feature.ORE.configure(new OreFeatureConfig(
|
||||
new BlockMatchRuleTest(Blocks.SANDSTONE), QuickieBlocks.ORE_SAND_SALPETER.getDefaultState(), 3));
|
||||
|
||||
public static final PlacedFeature PF_ORESULPHOR = CF_ORESULPHOR.withPlacement(CountPlacementModifier.of(7),
|
||||
SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0)));
|
||||
public static final PlacedFeature PF_ORENETHERSULPHOR = CF_ORENETHERSULPHOR.withPlacement(
|
||||
CountPlacementModifier.of(10), SquarePlacementModifier.of(),
|
||||
HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0)));
|
||||
public static final PlacedFeature PF_ORESALPETER = CF_ORESALPETER.withPlacement(CountPlacementModifier.of(10),
|
||||
SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0)));
|
||||
public static final PlacedFeature PF_DIRTSALPETER = CF_DIRTSALPETER.withPlacement(CountPlacementModifier.of(4),
|
||||
SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0)));
|
||||
public static final PlacedFeature PF_SANDSALPETER = CF_SANDSALPETER.withPlacement(CountPlacementModifier.of(4),
|
||||
SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0)));
|
||||
public static final PlacedFeature PF_ORESANDSALPETER = CF_ORESANDSALPETER.withPlacement(CountPlacementModifier.of(4),
|
||||
SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0)));
|
||||
@SuppressWarnings("unchecked")
|
||||
public static final ConfiguredFeature<?, ?> CF_ORESULPHOR = new ConfiguredFeature(Feature.ORE, new OreFeatureConfig(
|
||||
OreConfiguredFeatures.STONE_ORE_REPLACEABLES, QuickieBlocks.ORE_SULPHOR.getDefaultState(), 20));
|
||||
@SuppressWarnings("unchecked")
|
||||
public static final ConfiguredFeature<?, ?> CF_ORENETHERSULPHOR = new ConfiguredFeature(Feature.ORE,
|
||||
new OreFeatureConfig(OreConfiguredFeatures.NETHERRACK, QuickieBlocks.ORE_NETHER_SULPHOR.getDefaultState(), 24));
|
||||
@SuppressWarnings("unchecked")
|
||||
public static final ConfiguredFeature<?, ?> CF_ORESALPETER = new ConfiguredFeature(Feature.ORE, new OreFeatureConfig(
|
||||
OreConfiguredFeatures.STONE_ORE_REPLACEABLES, QuickieBlocks.ORE_SALPETER.getDefaultState(), 12));
|
||||
@SuppressWarnings("unchecked")
|
||||
public static final ConfiguredFeature<?, ?> CF_DIRTSALPETER = new ConfiguredFeature(Feature.REPLACE_SINGLE_BLOCK,
|
||||
new EmeraldOreFeatureConfig(Blocks.DIRT.getDefaultState(), QuickieBlocks.DIRT_SALPETER.getDefaultState()));
|
||||
@SuppressWarnings("unchecked")
|
||||
public static final ConfiguredFeature<?, ?> CF_SANDSALPETER = new ConfiguredFeature(Feature.REPLACE_SINGLE_BLOCK,
|
||||
new EmeraldOreFeatureConfig(Blocks.SAND.getDefaultState(), QuickieBlocks.SAND_SALPETER.getDefaultState()));
|
||||
@SuppressWarnings("unchecked")
|
||||
public static final ConfiguredFeature<?, ?> CF_ORESANDSALPETER = new ConfiguredFeature(Feature.REPLACE_SINGLE_BLOCK,
|
||||
new EmeraldOreFeatureConfig(Blocks.SANDSTONE.getDefaultState(),
|
||||
QuickieBlocks.ORE_SAND_SALPETER.getDefaultState()));
|
||||
|
||||
public static final PlacedFeature PF_ORESULPHOR = new PlacedFeature(RegistryEntry.of(CF_ORESULPHOR),
|
||||
Arrays.asList(CountPlacementModifier.of(7), SquarePlacementModifier.of(),
|
||||
HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0))));
|
||||
public static final PlacedFeature PF_ORENETHERSULPHOR = new PlacedFeature(RegistryEntry.of(CF_ORENETHERSULPHOR),
|
||||
Arrays.asList(CountPlacementModifier.of(10), SquarePlacementModifier.of(),
|
||||
HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0))));
|
||||
public static final PlacedFeature PF_ORESALPETER = new PlacedFeature(RegistryEntry.of(CF_ORESALPETER),
|
||||
Arrays.asList(CountPlacementModifier.of(10), SquarePlacementModifier.of(),
|
||||
HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0))));
|
||||
public static final PlacedFeature PF_DIRTSALPETER = new PlacedFeature(RegistryEntry.of(CF_DIRTSALPETER),
|
||||
Arrays.asList(CountPlacementModifier.of(4), SquarePlacementModifier.of(),
|
||||
HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0))));
|
||||
public static final PlacedFeature PF_SANDSALPETER = new PlacedFeature(RegistryEntry.of(CF_SANDSALPETER),
|
||||
Arrays.asList(CountPlacementModifier.of(4), SquarePlacementModifier.of(),
|
||||
HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0))));
|
||||
public static final PlacedFeature PF_ORESANDSALPETER = new PlacedFeature(RegistryEntry.of(CF_ORESANDSALPETER),
|
||||
Arrays.asList(CountPlacementModifier.of(4), SquarePlacementModifier.of(),
|
||||
HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.belowTop(0))));
|
||||
|
||||
public static final ItemGroup QUICKIEFABRIC_GROUP = FabricItemGroupBuilder
|
||||
.create(new Identifier(QUICKIEFABRIC, "all")).icon(() -> new ItemStack(QuickieItems.SPEEDPOWDER))
|
||||
|
@ -7,7 +7,7 @@ import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
@ -22,7 +22,7 @@ public interface ToolRangeable {
|
||||
/**
|
||||
* check if this block state is one that affects the neighbor blocks to break
|
||||
* also if they are from the same type
|
||||
*
|
||||
*
|
||||
* @param blockState the block state of the current block
|
||||
* @return true or false
|
||||
*/
|
||||
@ -30,7 +30,7 @@ public interface ToolRangeable {
|
||||
|
||||
/**
|
||||
* get list of blocks that belong together (could be useful for stripped logs)
|
||||
*
|
||||
*
|
||||
* @param block of the set
|
||||
* @return the list of blocks or null if not found
|
||||
*/
|
||||
|
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.ToolManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.LeavesBlock;
|
||||
@ -13,7 +12,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
@ -36,8 +35,7 @@ public class ToolRangeableAxe extends AxeItem implements ToolRangeable {
|
||||
|
||||
@Override
|
||||
public boolean canBreakNeighbors(BlockState blockIn) {
|
||||
return ToolManager.handleIsEffectiveOn(blockIn, new ItemStack(this), null)
|
||||
|| blockIn.getBlock() instanceof LeavesBlock;
|
||||
return super.isSuitableFor(blockIn) || blockIn.getBlock() instanceof LeavesBlock;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,7 +8,6 @@ import org.apache.logging.log4j.Logger;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.init.RegistryManager;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.ToolManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
@ -85,7 +84,7 @@ public class ToolSpeedpowderHoe extends HoeItem implements ToolRangeable {
|
||||
|
||||
@Override
|
||||
public boolean canBreakNeighbors(BlockState blockState) {
|
||||
return ToolManager.handleIsEffectiveOn(blockState, new ItemStack(this), null)
|
||||
return super.isSuitableFor(blockState)
|
||||
|| Blocks.GRASS.equals(blockState.getBlock())
|
||||
|| Blocks.FERN.equals(blockState.getBlock())
|
||||
|| Blocks.LARGE_FERN.equals(blockState.getBlock());
|
||||
|
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.init.RegistryManager;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.ToolManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.Item;
|
||||
@ -15,7 +14,7 @@ import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
@ -26,7 +25,7 @@ public class ToolSpeedpowderPickaxe extends PickaxeItem implements ToolRangeable
|
||||
public ToolSpeedpowderPickaxe() {
|
||||
super(ToolMaterials.DIAMOND, 4, 2.0f, new Item.Settings().group(RegistryManager.QUICKIEFABRIC_GROUP));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public HarvestRange getRange(ItemStack stack) {
|
||||
NbtCompound tag = stack.getNbt();
|
||||
@ -40,7 +39,7 @@ public class ToolSpeedpowderPickaxe extends PickaxeItem implements ToolRangeable
|
||||
|
||||
@Override
|
||||
public boolean canBreakNeighbors(BlockState blockIn) {
|
||||
return ToolManager.handleIsEffectiveOn(blockIn, new ItemStack(this), null);
|
||||
return super.isSuitableFor(blockIn);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.init.RegistryManager;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.ToolManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.Item;
|
||||
@ -19,7 +18,7 @@ import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
@ -75,7 +74,7 @@ public class ToolSpeedpowderShovel extends ShovelItem implements ToolRangeable {
|
||||
|
||||
@Override
|
||||
public boolean canBreakNeighbors(BlockState blockState) {
|
||||
return ToolManager.handleIsEffectiveOn(blockState, new ItemStack(this), null);
|
||||
return super.isSuitableFor(blockState);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -26,9 +26,9 @@
|
||||
"quickiefabric.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.12.7",
|
||||
"fabricloader": ">=0.13.3",
|
||||
"fabric": "*",
|
||||
"minecraft": "1.18.1",
|
||||
"minecraft": "1.18.2",
|
||||
"java": ">=17"
|
||||
},
|
||||
"suggests": {
|
||||
|
@ -2,7 +2,7 @@
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "de.jottyfan.minecraft.quickiefabric.mixin",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"mixins": [
|
||||
"BlockBreakMixin"
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user