Add current charge to Waila tooltip (#1013)
This commit is contained in:
parent
09007c58b2
commit
c7f2b7d29c
|
@ -88,12 +88,14 @@ public class DataProviderBloodAltar implements IWailaDataProvider
|
|||
|
||||
if (hasSeer)
|
||||
{
|
||||
int charge = accessor.getNBTData().getCompoundTag("bloodAltar").getInteger(Constants.NBT.ALTAR_TOTAL_CHARGE);
|
||||
int progress = accessor.getNBTData().getCompoundTag("bloodAltar").getInteger(Constants.NBT.ALTAR_PROGRESS);
|
||||
int liquidRequired = accessor.getNBTData().getCompoundTag("bloodAltar").getInteger(Constants.NBT.ALTAR_LIQUID_REQ);
|
||||
int craftAmount = 1;
|
||||
if (accessor.getNBTData().getTagList("Items", 10).get(0).getId() == 10)
|
||||
craftAmount = ((NBTTagCompound)accessor.getNBTData().getTagList("Items", 10).get(0)).getByte("Count");
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.sigil.seer.currentAltarProgress.percent", (int) (((double) progress / (double) liquidRequired * 100) / craftAmount) + "%"));
|
||||
currenttip.add(TextHelper.localizeEffect("tooltip.BloodMagic.sigil.seer.currentCharge", charge));
|
||||
}
|
||||
}
|
||||
} else
|
||||
|
|
Loading…
Reference in a new issue