diff options
author | HoleFish <48403212+HoleFish@users.noreply.github.com> | 2024-09-09 05:13:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-08 21:13:37 +0000 |
commit | 65e0f38db67b21e1a4e6e950ea15431b6f7bfd44 (patch) | |
tree | e2014e1045dcb252e7634c65aa45dc1b7cdcabe7 /src/main/java/tectech/thing/metaTileEntity/multi/MTEEyeOfHarmony.java | |
parent | c248635e865ddaee1afec67d0710908054f6894f (diff) | |
download | GT5-Unofficial-65e0f38db67b21e1a4e6e950ea15431b6f7bfd44.tar.gz GT5-Unofficial-65e0f38db67b21e1a4e6e950ea15431b6f7bfd44.tar.bz2 GT5-Unofficial-65e0f38db67b21e1a4e6e950ea15431b6f7bfd44.zip |
Add astral array amount tooltips to EOH (#3120)
Co-authored-by: boubou19 <miisterunknown@gmail.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: GDCloud <93287602+GDCloudstrike@users.noreply.github.com>
Diffstat (limited to 'src/main/java/tectech/thing/metaTileEntity/multi/MTEEyeOfHarmony.java')
-rw-r--r-- | src/main/java/tectech/thing/metaTileEntity/multi/MTEEyeOfHarmony.java | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEEyeOfHarmony.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEEyeOfHarmony.java index 0104723c3c..bdbef3048e 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEEyeOfHarmony.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEEyeOfHarmony.java @@ -1690,15 +1690,22 @@ public class MTEEyeOfHarmony extends TTMultiblockBase implements IConstructable, @Override public void addAdditionalTooltipInformation(ItemStack stack, List<String> tooltip) { - if (stack.hasTagCompound() && stack.getTagCompound() - .hasKey(PLANET_BLOCK)) { - tooltip.add( - 1, - GTLanguageManager.addStringLocalization("EOH_Controller_PlanetBlock", "Current Planet Block: ") + AQUA - + new ItemStack( - ModBlocks.getBlock( - stack.getTagCompound() - .getString(PLANET_BLOCK))).getDisplayName()); + if (stack.hasTagCompound()) { + NBTTagCompound nbt = stack.getTagCompound(); + if (nbt.hasKey(PLANET_BLOCK)) { + tooltip.add( + 1, + GTLanguageManager.addStringLocalization("EOH_Controller_PlanetBlock", "Current Planet Block: ") + + AQUA + + new ItemStack(ModBlocks.getBlock(nbt.getString(PLANET_BLOCK))).getDisplayName()); + } + if (nbt.getLong(ASTRAL_ARRAY_AMOUNT_NBT_TAG) > 0) { + tooltip.add( + 1, + GTLanguageManager + .addStringLocalization("EOH_Controller_AstralArrayAmount", "Stored Astral Arrays: ") + AQUA + + formatNumbers(nbt.getLong(ASTRAL_ARRAY_AMOUNT_NBT_TAG))); + } } } |