diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java deleted file mode 100644 index 74655fb744..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -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 { - - private static final HashMap<ItemStack, String> mTooltipCache = new HashMap<ItemStack, String>(); - - public static void addTooltipForItem(ItemStack aStack, String aTooltip) { - mTooltipCache.put(aStack, aTooltip); - } - - @SubscribeEvent - public void onItemTooltip(ItemTooltipEvent event){ - if (event != null) { - if (event.itemStack != null) { - 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); - } - } - } - } - } - } - -} |