mirror of
https://github.com/GTNewHorizons/IguanaTweaksTConstruct.git
synced 2026-11-26 06:43:05 +00:00
Fix boosting tooltip stuff
This commit is contained in:
1 parent
d8b25235f7
commit
d7be26bfdf
2 files changed
+18
-15
No files matched your search
@@ -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) + "%";
|
||||
|
||||
|
||||
+17
-14
@@ -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
|
||||
|
||||
Reference in new issue
Block a user