From f17b5faaf678830dbd7f669615943c9a8ce31bd5 Mon Sep 17 00:00:00 2001 From: GJ Date: Wed, 6 Nov 2013 14:52:19 -0500 Subject: [PATCH] Parenthesis are good. --- src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java b/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java index 7251962ab..87c217ad3 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java @@ -182,7 +182,7 @@ public class SkillUtils { public static void handleDurabilityChange(ItemStack itemStack, int durabilityModifier, double maxDamageModifier) { Material type = itemStack.getType(); short maxDurability = mcMMO.getRepairableManager().isRepairable(type) ? mcMMO.getRepairableManager().getRepairable(type).getMaximumDurability() : type.getMaxDurability(); - durabilityModifier = (int) Math.min(durabilityModifier / itemStack.getEnchantmentLevel(Enchantment.DURABILITY) + 1, maxDurability * maxDamageModifier); + durabilityModifier = (int) Math.min(durabilityModifier / (itemStack.getEnchantmentLevel(Enchantment.DURABILITY) + 1), maxDurability * maxDamageModifier); itemStack.setDurability((short) Math.min(itemStack.getDurability() + durabilityModifier, maxDurability)); }