Tweaked durability handling slightly.

Now routes everything through one function to handle enchants and max
durability. Use max durability from RepairableManager by default to
account for mod tools.
This commit is contained in:
GJ
2013-11-06 08:45:20 -05:00
parent c31f5b5782
commit cf56ca35eb
5 changed files with 16 additions and 33 deletions

View File

@ -67,7 +67,7 @@ public class MiningManager extends SkillManager {
Material material = blockState.getType();
if (mcMMOPlayer.getAbilityMode(skill.getAbility())) {
SkillUtils.handleDurabilityChange(getPlayer().getItemInHand(), Config.getInstance().getAbilityToolDamage(), true);
SkillUtils.handleDurabilityChange(getPlayer().getItemInHand(), Config.getInstance().getAbilityToolDamage());
}
if ((ModUtils.isCustomMiningBlock(blockState) && !ModUtils.getCustomBlock(blockState).isDoubleDropEnabled()) || material != Material.GLOWING_REDSTONE_ORE && !Config.getInstance().getDoubleDropsEnabled(skill, material)) {