Pass stack to mining speed check. Closes #2348

This commit is contained in:
drcrazy 2021-02-19 13:19:30 +03:00 committed by modmuss50
parent 9b8286d8fb
commit 8398139271

View file

@ -93,10 +93,11 @@ public class DrillItem extends PickaxeItem implements EnergyHolder, ItemDurabili
return true; return true;
} }
// More checks to fix #2225 // More checks to fix #2225
if (Items.DIAMOND_SHOVEL.getMiningSpeedMultiplier(null, blockIn) > 1.0f) { // Pass stack to fix #2348
if (Items.DIAMOND_SHOVEL.getMiningSpeedMultiplier(new ItemStack(Items.DIAMOND_SHOVEL), blockIn) > 1.0f) {
return true; return true;
} }
return Items.DIAMOND_PICKAXE.getMiningSpeedMultiplier(null, blockIn) > 1.0f; return Items.DIAMOND_PICKAXE.getMiningSpeedMultiplier(new ItemStack(Items.DIAMOND_SHOVEL), blockIn) > 1.0f;
} }
// MiningToolItem // MiningToolItem