mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
Finalized durability stuff in tree feller. XP nerf only for jungle now.
This commit is contained in:
@ -68,7 +68,10 @@ public class WoodCutting
|
||||
return;
|
||||
}
|
||||
int durabilityLoss = toBeFelled.size(), xp = 0;
|
||||
|
||||
|
||||
//Damage the tool
|
||||
player.getItemInHand().setDurability((short) (player.getItemInHand().getDurability()+durabilityLoss));
|
||||
|
||||
//This is to prevent using wood axes everytime you tree fell
|
||||
if((player.getItemInHand().getDurability() + durabilityLoss >= player.getItemInHand().getType().getMaxDurability())
|
||||
|| player.getItemInHand().getType() == Material.AIR || player.getItemInHand() == null)
|
||||
@ -81,9 +84,6 @@ public class WoodCutting
|
||||
return;
|
||||
}
|
||||
|
||||
//Damage the tool
|
||||
player.getItemInHand().setDurability((short) (player.getItemInHand().getDurability()+durabilityLoss));
|
||||
|
||||
//Prepare ItemStacks
|
||||
ItemStack item;
|
||||
ItemStack oak = new ItemStack(Material.LOG, 1, (byte)0, (byte)0);
|
||||
@ -134,7 +134,7 @@ public class WoodCutting
|
||||
xp += LoadProperties.mbirch;
|
||||
break;
|
||||
case 3:
|
||||
xp += LoadProperties.mjungle;
|
||||
xp += LoadProperties.mjungle/4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -161,7 +161,7 @@ public class WoodCutting
|
||||
}
|
||||
}
|
||||
|
||||
PP.addXP(SkillType.WOODCUTTING, xp/3, player); //Tree Feller gives nerf'd XP
|
||||
PP.addXP(SkillType.WOODCUTTING, xp, player); //Tree Feller gives nerf'd XP
|
||||
Skills.XpCheckSkill(SkillType.WOODCUTTING, player);
|
||||
|
||||
if(LoadProperties.toolsLoseDurabilityFromAbilities)
|
||||
|
Reference in New Issue
Block a user