finetuning

This commit is contained in:
Jörg Henke 2021-11-20 17:55:47 +01:00
parent 24f9abfb18
commit a11ed93048
6 changed files with 11 additions and 17 deletions

View File

@ -4,8 +4,8 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.14
loader_version=0.11.6
yarn_mappings=1.17.1+build.63
loader_version=0.12.5
# Mod Properties
mod_version = 1.17.1.5
@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G
archives_base_name = quickiefabric
# Dependencies
fabric_version=0.37.0+1.17
fabric_version=0.42.1+1.17

View File

@ -69,7 +69,7 @@ public interface ToolRangeable {
public static final Set<Identifier> PICKAXE_EXTERNAL_EFFECTIVE_ON = mergeSets(
Byg.createFromStrings("soapstone", "black_sandstone", "dacite", "rocky_stone", "red_rock", "pink_sandstone",
"purple_sandstone", "scoria_stone", "scoria_cobblestone"));
/**
* merge all sets
*

View File

@ -33,7 +33,7 @@ public class ToolRangeableAxe extends AxeItem implements ToolRangeable {
@Override
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) {
return getBlockList(state.getBlock()) != null ? this.miningSpeed : super.getMiningSpeedMultiplier(stack, state);
return this.miningSpeed;
}
@Override
@ -59,6 +59,9 @@ public class ToolRangeableAxe extends AxeItem implements ToolRangeable {
if (block instanceof LeavesBlock) {
return Lists.newArrayList(block);
}
if (super.isSuitableFor(block.getDefaultState())) {
return Lists.newArrayList(block);
}
return null;
}
}

View File

@ -63,7 +63,7 @@ public class ToolSpeedpowderHoe extends HoeItem implements ToolRangeable {
@Override
public boolean canBreakNeighbors(BlockState blockState) {
boolean result = HOE_EFFECTIVE_ON.contains(blockState.getBlock()) || checkExternalBlock(blockState.getBlock());
boolean result = super.isSuitableFor(blockState) || HOE_EFFECTIVE_ON.contains(blockState.getBlock()) || checkExternalBlock(blockState.getBlock());
if (!result) {
if (!blockState.isAir()) {
LOGGER.debug("cannot break block {} with that speedpowder hoe", Registry.BLOCK.getId(blockState.getBlock()));

View File

@ -28,15 +28,6 @@ public class ToolSpeedpowderPickaxe extends PickaxeItem implements ToolRangeable
super(ToolMaterials.DIAMOND, 4, 2.0f, new Item.Settings().group(RegistryManager.QUICKIEFABRIC_GROUP));
}
/**
* seems not to work
*/
@Override
public boolean isSuitableFor(BlockState state) {
return PICKAXE_EFFECTIVE_ON.contains(state.getBlock()) || checkExternalBlock(state.getBlock())
|| super.isSuitableFor(state);
}
@Override
public HarvestRange getRange(ItemStack stack) {
NbtCompound tag = stack.getNbt();
@ -50,7 +41,7 @@ public class ToolSpeedpowderPickaxe extends PickaxeItem implements ToolRangeable
@Override
public boolean canBreakNeighbors(BlockState blockIn) {
return super.isSuitableFor(blockIn) || PICKAXE_EFFECTIVE_ON.contains(blockIn.getBlock())
return super.isSuitableFor(blockIn) || super.isSuitableFor(blockIn) || PICKAXE_EFFECTIVE_ON.contains(blockIn.getBlock())
|| checkExternalBlock(blockIn.getBlock());
}

View File

@ -80,7 +80,7 @@ public class ToolSpeedpowderShovel extends ShovelItem implements ToolRangeable {
@Override
public boolean canBreakNeighbors(BlockState blockState) {
boolean result = SHOVEL_EFFECTIVE_ON.contains(blockState.getBlock()) || checkExternalBlock(blockState.getBlock());
boolean result = super.isSuitableFor(blockState) || SHOVEL_EFFECTIVE_ON.contains(blockState.getBlock()) || checkExternalBlock(blockState.getBlock());
if (!result) {
if (!blockState.isAir()) {
LOGGER.debug("cannot break block {} with that speedpowder shovel", Registry.BLOCK.getId(blockState.getBlock()));