Set the HarvestLevel to none for broken tools
@@ -10,11 +10,11 @@ import net.minecraft.world.World;
import java.util.List;
-import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import slimeknights.tconstruct.library.materials.Material;
import slimeknights.tconstruct.library.tinkering.PartMaterialType;
+import slimeknights.tconstruct.library.utils.ToolHelper;
public abstract class TinkerToolCore extends ToolCore {
@@ -53,6 +53,9 @@ public abstract class TinkerToolCore extends ToolCore {
@Override
public int getHarvestLevel(ItemStack stack, String toolClass, @Nullable EntityPlayer player, @Nullable IBlockState blockState) {
+ if(ToolHelper.isBroken(stack)) {
+ return -1;
+ }
if(player != null && DualToolHarvestUtils.shouldUseOffhand(player, blockState, stack)) {
ItemStack offhand = player.getHeldItemOffhand();
return offhand.getItem().getHarvestLevel(offhand, toolClass, player, blockState);
