This commit is contained in:
nossr50
2019-06-12 12:23:58 -07:00
parent 7ab70ba597
commit 9c04054017
7 changed files with 12 additions and 7 deletions

View File

@ -149,8 +149,8 @@ public final class Woodcutting {
*/
protected static boolean handleDurabilityLoss(Set<BlockState> treeFellerBlocks, ItemStack inHand) {
if(inHand.getItemMeta().getEnchants().get(Enchantment.DURABILITY) != null
&& inHand.getItemMeta().getEnchants().get(Enchantment.DURABILITY) >= 1) {
if((inHand.getItemMeta().getEnchants().get(Enchantment.DURABILITY) != null && inHand.getItemMeta().getEnchants().get(Enchantment.DURABILITY) >= 1)
|| (inHand.getItemMeta() != null && inHand.getItemMeta().isUnbreakable())) {
return true;
}