From 505df870145f113b289a309b1b339b4347451204 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Fri, 2 Mar 2012 12:31:53 -0800 Subject: [PATCH] Finalized durability stuff in tree feller. XP nerf only for jungle now. --- Changelog.txt | 2 +- .../java/com/gmail/nossr50/skills/WoodCutting.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 21bca7726..27c4a55a4 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -9,7 +9,7 @@ Key: Version 2.0.00-dev + Added Ocelots to Taming XP tables. - ! Changed Tree Feller to hand out 1/3 of normal XP for each LOG block it fells + ! Changed Tree Feller to hand out 1/4 of normal XP for each JUNGLE LOG block it fells ! Changed Tree Feller to only fell trees if you have enough durability ! Changed invincibility checks in EntityDamage listeners to accommodate for vanilla MC behaviour ! Changed Ignition to add fire ticks rather than replacing them. diff --git a/src/main/java/com/gmail/nossr50/skills/WoodCutting.java b/src/main/java/com/gmail/nossr50/skills/WoodCutting.java index ab0474abe..152b029c0 100644 --- a/src/main/java/com/gmail/nossr50/skills/WoodCutting.java +++ b/src/main/java/com/gmail/nossr50/skills/WoodCutting.java @@ -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)