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. --- .../implementations/base/GregtechMeta_MultiBlockBase.java | 7 +------ .../gregtech/api/util/SpecialBehaviourTooltipHandler.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 89c1112726..55378113d9 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -100,12 +100,7 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult try { calculatePollutionReduction = GT_MetaTileEntity_Hatch_Muffler.class.getDeclaredMethod("calculatePollutionReduction", int.class); - } catch (NoSuchMethodException | SecurityException e) {} - - - // Register the No-Bonus Special Behaviour. - new NoOutputBonusMultiBehaviour(); - + } catch (NoSuchMethodException | SecurityException e) {} } 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