Skip to content

Commit

Permalink
Don't damage the tool more than it's max durability
Browse files Browse the repository at this point in the history
  • Loading branch information
TfT-02 committed Dec 31, 2012
1 parent 7a503ea commit cc18794
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -97,7 +97,8 @@ else if ((inHand.getDurability() + durabilityLoss >= inHand.getType().getMaxDura
} }


/* 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;
Expand Down

0 comments on commit cc18794

Please sign in to comment.