diff --git a/patches/server/Add-Destroy-Speed-API.patch b/patches/server/Add-Destroy-Speed-API.patch index 113b765096..4c604c09f5 100644 --- a/patches/server/Add-Destroy-Speed-API.patch +++ b/patches/server/Add-Destroy-Speed-API.patch @@ -19,10 +19,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + net.minecraft.world.item.ItemStack nmsItemStack; + if (itemStack instanceof CraftItemStack) { + nmsItemStack = ((CraftItemStack) itemStack).handle; ++ if (nmsItemStack == null) { ++ nmsItemStack = net.minecraft.world.item.ItemStack.EMPTY; ++ } + } else { + nmsItemStack = CraftItemStack.asNMSCopy(itemStack); + } -+ float speed = nmsItemStack.getItem().getDestroySpeed(nmsItemStack, this.getNMS().getBlock().defaultBlockState()); ++ float speed = nmsItemStack.getDestroySpeed(this.getNMS().getBlock().defaultBlockState()); + if (speed > 1.0F && considerEnchants) { + int enchantLevel = net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.BLOCK_EFFICIENCY, nmsItemStack); + if (enchantLevel > 0) {