diff --git a/src/main/java/com/gmail/nossr50/skills/Skills.java b/src/main/java/com/gmail/nossr50/skills/Skills.java index d49ccf14e..e0451173b 100644 --- a/src/main/java/com/gmail/nossr50/skills/Skills.java +++ b/src/main/java/com/gmail/nossr50/skills/Skills.java @@ -193,7 +193,7 @@ public class Skills { if (PP.getSkillXpLevel(skillType) >= PP.getXpToLevel(skillType)) { int skillups = 0; - + while (PP.getSkillXpLevel(skillType) >= PP.getXpToLevel(skillType)) { if (skillType.getMaxLevel() >= PP.getSkillLevel(skillType) + 1) { skillups++; diff --git a/src/main/java/com/gmail/nossr50/skills/WoodCutting.java b/src/main/java/com/gmail/nossr50/skills/WoodCutting.java index fed66bb97..fe93be469 100644 --- a/src/main/java/com/gmail/nossr50/skills/WoodCutting.java +++ b/src/main/java/com/gmail/nossr50/skills/WoodCutting.java @@ -58,7 +58,7 @@ public class WoodCutting { return; } - int durabilityLoss = toBeFelled.size(); + int durabilityLoss = durabilityLossCalulate(toBeFelled); int xp = 0; ItemStack inHand = player.getItemInHand(); @@ -213,8 +213,10 @@ public class WoodCutting { if (!isTooAggressive(currentBlock, zNegative) && treeFellerCompatible(zNegative) && !toBeFelled.contains(zNegative)) { processTreeFelling(zNegative, toBeFelled); } + } - if (treeFellerCompatible(yPositive) && !toBeFelled.contains(yPositive)) { + if (treeFellerCompatible(yPositive)) { + if(!currentBlock.hasMetadata("mcmmoPlacedBlock") && !toBeFelled.contains(yPositive)) { processTreeFelling(yPositive, toBeFelled); } } @@ -317,4 +319,16 @@ public class WoodCutting { SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation()); } } + + private static int durabilityLossCalulate(ArrayList toBeFelled) { + int durabilityLoss = 0; + for (Block x : toBeFelled) { + if (x.getType().equals(Material.LOG)) { + durabilityLoss++; + durabilityLoss = durabilityLoss + LoadProperties.abilityDurabilityLoss; + } + } + + return durabilityLoss; + } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index eb61f920d..f9363e299 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -126,10 +126,11 @@ Abilities: # # Settings for Skills +# Level cap of 0 for no limit ### Skills: Acrobatics: - Level_Cap: 0 #Level cap of 0 for no limit + Level_Cap: 0 Archery: Level_Cap: 0 Axes: