diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/OldToolConversionHandler.java b/src/main/java/iguanaman/iguanatweakstconstruct/OldToolConversionHandler.java index bb7cabc..ebf311d 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/OldToolConversionHandler.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/OldToolConversionHandler.java @@ -46,14 +46,14 @@ public class OldToolConversionHandler { // but we need to check for boosting xp int hlvl = tags.getInteger("HarvestLevel"); if(hlvl > 0 && (itemStack.getItem() instanceof Pickaxe || itemStack.getItem() instanceof Hammer)) - if(!LevelingLogic.hasBoostXp(tags) && Config.levelingPickaxeBoost) + if(!LevelingLogic.hasBoostXp(tags) && Config.pickaxeBoostRequired) return true; // check mining level. int realHlvl = TConstructRegistry.getMaterial(tags.getInteger("Head")).harvestLevel(); // unboosted but boost requires -> we need to reduce the hlvl by 1 - if(Config.levelingPickaxeBoost && !LevelingLogic.isBoosted(tags) && (itemStack.getItem() instanceof Pickaxe || itemStack.getItem() instanceof Hammer)) + if(Config.pickaxeBoostRequired && !LevelingLogic.isBoosted(tags) && (itemStack.getItem() instanceof Pickaxe || itemStack.getItem() instanceof Hammer)) return hlvl != Math.max(realHlvl-1, 0); // if it's boosted, check if it's boosted by a diamond from bronze level @@ -73,7 +73,7 @@ public class OldToolConversionHandler { if(!LevelingLogic.hasLevel(tags) && Config.toolLeveling) LevelingLogic.addLevelingTags(tags, tool); // boost xp - else if(!LevelingLogic.hasBoostXp(tags) && Config.levelingPickaxeBoost) + else if(!LevelingLogic.hasBoostXp(tags) && Config.pickaxeBoostRequired) LevelingLogic.addBoostTags(tags, tool); // recreate the head itemstack diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/leveling/LevelingLogic.java b/src/main/java/iguanaman/iguanatweakstconstruct/leveling/LevelingLogic.java index 2131c93..9b4d91c 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/leveling/LevelingLogic.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/leveling/LevelingLogic.java @@ -72,7 +72,7 @@ public final class LevelingLogic { public static void addBoostTags(NBTTagCompound tag, ToolCore tool) { int hlvl = tag.getInteger("HarvestLevel"); - if(!Config.levelingPickaxeBoost) + if(!Config.pickaxeBoostRequired) return; if(hlvl == 0 || !(tool instanceof Pickaxe || tool instanceof Hammer)) return; @@ -80,10 +80,8 @@ public final class LevelingLogic { tag.setLong(TAG_BOOST_EXP, 0); tag.setBoolean(TAG_IS_BOOSTED, false); - // reduce harvestlevel by 1 if pickaxe boosting is required - if(Config.pickaxeBoostRequired) { - tag.setInteger("HarvestLevel", hlvl - 1); - } + // reduce harvestlevel by 1 + tag.setInteger("HarvestLevel", hlvl - 1); } /** diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/leveling/handlers/LevelingToolTipHandler.java b/src/main/java/iguanaman/iguanatweakstconstruct/leveling/handlers/LevelingToolTipHandler.java index 61328a6..ec345dc 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/leveling/handlers/LevelingToolTipHandler.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/leveling/handlers/LevelingToolTipHandler.java @@ -76,7 +76,7 @@ public class LevelingToolTipHandler { inserter.add(mLvl); // display extended tooltip? - if(Config.showTooltipXP && advanced && LevelingLogic.hasBoostXp(tags) && Config.levelingPickaxeBoost) + if(Config.showTooltipXP && advanced && LevelingLogic.hasBoostXp(tags) && Config.pickaxeBoostRequired) { // xp if not boosted if(LevelingLogic.canBoostMiningLevel(tags)) diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/reference/Config.java b/src/main/java/iguanaman/iguanatweakstconstruct/reference/Config.java index cfce3bf..a11f6b9 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/reference/Config.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/reference/Config.java @@ -149,8 +149,8 @@ public class Config { // pick boosting behaviour pickaxeBoostRequired = configfile.getBoolean("pickaxeBoostRequired", CATEGORY_PickLeveling, true, "Every Pickaxes Mining Level is reduced by 1 and needs a mining levelup (separate from tool level) or, if enabled, a mob head modifier to advance"); - levelingPickaxeBoost = configfile.getBoolean("allowLevelingBoost", CATEGORY_PickLeveling, true, "Pickaxes gain Mining Xp. A pickaxes mining level can be boosted through gaining XP. Should be used with pickaxeBoostRequired, otherwise tools will be able to mine higher than normally."); - mobHeadPickaxeBoost = configfile.getBoolean("addMobHeadBoost", CATEGORY_PickLeveling, true, "Mob heads can be used to boost a pickaxe's mining xp (REQUIRES allowLevelBoost)"); + levelingPickaxeBoost = configfile.getBoolean("allowLevelingBoost", CATEGORY_PickLeveling, true, "Pickaxes gain Mining Xp by using the pickaxe."); + mobHeadPickaxeBoost = configfile.getBoolean("addMobHeadBoost", CATEGORY_PickLeveling, true, "Mob heads can be used to boost a pickaxe's mining xp."); mobHeadRequiresModifier = configfile.getBoolean("mobHeadBoostNeedsModifier", CATEGORY_PickLeveling, false, "Mob head boosting requires a free modifier"); levelingPickaxeBoostXpPercentage = configfile.getInt("xpRequiredPickBoostPercentage", CATEGORY_PickLeveling, 100, 1, 999, "Change the percentage of XP required to boost a pick (i.e. 200 means 2x normal boost xp required)");