mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 11:03:43 +01:00 
			
		
		
		
	Don't damage the tool more than it's max durability
This commit is contained in:
		@@ -97,7 +97,8 @@ public class WoodCutting {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* Damage the tool */
 | 
					        /* Damage the tool */
 | 
				
			||||||
        inHand.setDurability((short) (inHand.getDurability() + durabilityLoss));
 | 
					        if (inHand.getDurability() + durabilityLoss > inHand.getType().getMaxDurability()) inHand.setDurability((short) (inHand.getType().getMaxDurability()));
 | 
				
			||||||
 | 
					        else inHand.setDurability((short) (inHand.getDurability() + durabilityLoss));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Prepare ItemStacks
 | 
					        //Prepare ItemStacks
 | 
				
			||||||
        ItemStack item = null;
 | 
					        ItemStack item = null;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user