mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 03:04:44 +02:00
Improved WG compatibility + Tree Feller will now damage unbreaking
enchant tools again
This commit is contained in:
@ -148,9 +148,8 @@ public final class Woodcutting {
|
||||
* @return True if the tool can sustain the durability loss
|
||||
*/
|
||||
protected static boolean handleDurabilityLoss(Set<BlockState> treeFellerBlocks, ItemStack inHand) {
|
||||
|
||||
if((inHand.getItemMeta().getEnchants().get(Enchantment.DURABILITY) != null && inHand.getItemMeta().getEnchants().get(Enchantment.DURABILITY) >= 1)
|
||||
|| (inHand.getItemMeta() != null && inHand.getItemMeta().isUnbreakable())) {
|
||||
//Treat the NBT tag for unbreakable and the durability enchant differently
|
||||
if(inHand.getItemMeta() != null && inHand.getItemMeta().isUnbreakable()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user