From ab411da881e3307f45eeb0f4f944bbf9f691e1cc Mon Sep 17 00:00:00 2001 From: Alexdoru <57050655+Alexdoru@users.noreply.github.com> Date: Mon, 16 Sep 2024 03:11:55 +0200 Subject: delete SpecialBehaviourTooltipHandler.java which does nothing --- .../api/util/SpecialBehaviourTooltipHandler.java | 35 ---------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java deleted file mode 100644 index da6db942aa..0000000000 --- a/src/main/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 net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gregtech.api.util.GTUtility; - -public class SpecialBehaviourTooltipHandler { - - private static final HashMap mTooltipCache = new HashMap<>(); - - 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 (GTUtility.areStacksEqual(aKey, event.itemStack, false)) { - String s = mTooltipCache.get(aKey); - if (s != null && s.length() > 0) { - event.toolTip.add(EnumChatFormatting.RED + s); - } - } - } - } - } - } -} -- cgit