From c5a5c3e6e28cea170b2df3e005caff0e3c888ea9 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Thu, 31 Jul 2014 13:12:43 +0200 Subject: [PATCH] Change boost xp penality on replacement to only apply if the head is changed --- .../java/iguanaman/iguanatweakstconstruct/reference/Config.java | 2 +- .../iguanatweakstconstruct/replacing/ReplacementLogic.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/reference/Config.java b/src/main/java/iguanaman/iguanatweakstconstruct/reference/Config.java index dd98d0f..9ddce15 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/reference/Config.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/reference/Config.java @@ -124,7 +124,7 @@ public class Config { /** PartReplacement Module **/ partReplacementXpPenality = configfile.getInt("XpPenality", CATEGORY_PartReplacement, 0, 0, 100, "How much of the current XP% shall be removed when replacing parts (So if you had 50%, and penality is 10% it'll remove 5% xp, resulting in 45%). Does not remove Skill Levels."); - partReplacementBoostXpPenality = configfile.getInt("PickBoostXpPenality", CATEGORY_PartReplacement, 5, 0, 100, "How much of the current XP% to the next mining level shall be removed when replacing parts. Useful to remove the mining level boost on part replacement."); + partReplacementBoostXpPenality = configfile.getInt("PickBoostXpPenality", CATEGORY_PartReplacement, 5, 0, 100, "How much of the current XP% to the next mining level shall be removed when replacing the pickaxe head. Useful to remove the mining level boost on part replacement."); /** MobHeads **/ // todo: implement diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/replacing/ReplacementLogic.java b/src/main/java/iguanaman/iguanatweakstconstruct/replacing/ReplacementLogic.java index 483c293..a85407b 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/replacing/ReplacementLogic.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/replacing/ReplacementLogic.java @@ -180,7 +180,7 @@ public abstract class ReplacementLogic { xp *= newRequiredBoostXp / (float) oldRequiredBoostXp; // xp penality? - if(Config.partReplacementBoostXpPenality > 0) + if(Config.partReplacementBoostXpPenality > 0 && type == HEAD) { if(LevelingLogic.isBoosted(tags)) { tags.setBoolean(LevelingLogic.TAG_IS_BOOSTED, false);