From 80cde86d9d1f357b964f5cdad3b8b71bc2ba6d33 Mon Sep 17 00:00:00 2001 From: Lulonaut <67191924+Lulonaut@users.noreply.github.com> Date: Thu, 21 Apr 2022 12:49:42 +0200 Subject: fix expand pet exp (#114) --- .../notenoughupdates/listener/ItemTooltipListener.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java index cc2b11e8..501ed8a3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java @@ -81,9 +81,9 @@ public class ItemTooltipListener { String internalname = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(event.itemStack); if (internalname == null) { - onItemToolTipInternalNameNull(event); return; } + petToolTipXPExtendPetMenu(event); boolean hasEnchantments = event.itemStack.getTagCompound().getCompoundTag("ExtraAttributes").hasKey( "enchantments", @@ -741,10 +741,6 @@ public class ItemTooltipListener { } } - private void onItemToolTipInternalNameNull(ItemTooltipEvent event) { - petToolTipXPExtendPetMenu(event); - } - private List petToolTipXPExtend(ItemTooltipEvent event) { List tooltipText = new ArrayList<>(); if (NotEnoughUpdates.INSTANCE.config.tooltipTweaks.petExtendExp) { @@ -929,7 +925,9 @@ public class ItemTooltipListener { } else if (NotEnoughUpdates.INSTANCE.packDevEnabled) { event.toolTip.add(""); event.toolTip.add(EnumChatFormatting.AQUA + "NEU Pack Dev Info:"); - event.toolTip.add(EnumChatFormatting.GRAY + "Press " + EnumChatFormatting.GOLD + "[KEY]" + EnumChatFormatting.GRAY + " to copy line"); + event.toolTip.add( + EnumChatFormatting.GRAY + "Press " + EnumChatFormatting.GOLD + "[KEY]" + EnumChatFormatting.GRAY + + " to copy line"); String internal = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(event.itemStack); -- cgit