From 2525ff075586759657e89b9f01969f0596bca2df Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Tue, 10 Dec 2019 11:01:32 +0000 Subject: % Changed name of custom GT++ Programmed Circuit to Programmed Bio Circuit. $ Fixed getNumberedBioCircuit() in CI. $ Fixed an issue where stripped fields were referenced in server side bytecode. $ Fixed Tooltips not working as intended for items giving custom GT++ Multi behaviour. $ Fixed 'No Bonus Output Chance' item not registering correctly. --- .../gregtech/api/util/SpecialBehaviourTooltipHandler.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/util') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java index f345a67db6..74655fb744 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java @@ -3,7 +3,9 @@ package gtPlusPlus.xmod.gregtech.api.util; import java.util.HashMap; import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.event.entity.player.ItemTooltipEvent; public class SpecialBehaviourTooltipHandler { @@ -18,9 +20,13 @@ public class SpecialBehaviourTooltipHandler { public void onItemTooltip(ItemTooltipEvent event){ if (event != null) { if (event.itemStack != null) { - String s = mTooltipCache.get(event.itemStack); - if (s != null && s.length() > 0) { - event.toolTip.add(s); + for (ItemStack aKey : mTooltipCache.keySet()) { + if (GT_Utility.areStacksEqual(aKey, event.itemStack, false)) { + String s = mTooltipCache.get(aKey); + if (s != null && s.length() > 0) { + event.toolTip.add(EnumChatFormatting.RED+s); + } + } } } } -- cgit