diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/leveling/LevelingTooltips.java b/src/main/java/iguanaman/iguanatweakstconstruct/leveling/LevelingTooltips.java index b3c5a7e..eb21848 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/leveling/LevelingTooltips.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/leveling/LevelingTooltips.java @@ -45,7 +45,7 @@ public abstract class LevelingTooltips { if (tags == null) tags = tool.getTagCompound().getCompoundTag("InfiTool"); int requiredXp = LevelingLogic.getRequiredXp(tool, tags, boostXp); - long currentXp = boostXp ? LevelingLogic.getBoostXp(tags) : LevelingLogic.getBoostXp(tags); + long currentXp = boostXp ? LevelingLogic.getBoostXp(tags) : LevelingLogic.getXp(tags); float xpPercentage = (float)currentXp / (float)requiredXp * 100f; String xpPercentageString = String.format("%.2f", xpPercentage) + "%"; diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/leveling/handlers/ToolTipHandler.java b/src/main/java/iguanaman/iguanatweakstconstruct/leveling/handlers/ToolTipHandler.java index f996e2d..7899bd4 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/leveling/handlers/ToolTipHandler.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/leveling/handlers/ToolTipHandler.java @@ -54,22 +54,25 @@ public class ToolTipHandler { { int hLevel = tags.getInteger("HarvestLevel"); String mLvl = LevelingTooltips.getMiningLevelTooltip(hLevel); - // is the pick applicable for mining level boosting? if yes display xp - if(LevelingLogic.hasBoostXp(tags) && LevelingLogic.canBoostMiningLevel(tags)) { - // add minimal xp if config option is set - if (!advanced && Config.showMinimalTooltipXP && !LevelingLogic.isBoosted(tags)) + // display minimal tooltip? + if(Config.showMinimalTooltipXP && !advanced) + { + if(LevelingLogic.hasBoostXp(tags) && LevelingLogic.canBoostMiningLevel(tags)) mLvl += " (" + LevelingTooltips.getBoostXpString(stack, tags, false) + ")"; - inserter.add(mLvl); - - // advanced mining level boost progress info - if (advanced && Config.levelingPickaxeBoost && Config.showTooltipXP) { - if (LevelingLogic.isBoosted(tags)) - inserter.add(LevelingTooltips.getBoostedTooltip()); - else - inserter.add(LevelingTooltips.getBoostXpToolTip(stack, tags)); - } } - else inserter.add(mLvl); + + inserter.add(mLvl); + + // display extended tooltip? + if(Config.showTooltipXP && advanced && LevelingLogic.hasBoostXp(tags)) + { + // xp if not boosted + if(LevelingLogic.canBoostMiningLevel(tags)) + inserter.add(LevelingTooltips.getBoostXpToolTip(stack, tags)); + // otherwise boosted message + else if(LevelingLogic.isBoosted(tags)) + inserter.add(LevelingTooltips.getBoostedTooltip()); + } } // add skill level