diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java | 5 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index 29013ea5..c499ce0f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -2335,6 +2335,11 @@ public class NEUEventListener { private List<String> petToolTipXPExtend(ItemTooltipEvent event) { List<String> tooltipText = new ArrayList(); if (NotEnoughUpdates.INSTANCE.config.tooltipTweaks.petExtendExp) { + if(event.itemStack.getTagCompound().hasKey("ItemList")){ + if(event.itemStack.getTagCompound().getBoolean("ItemList")){ + return tooltipText; + } + } //7 is just a random number i chose, prob no pets with less lines than 7 if (event.toolTip.size() > 7) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index e2e582fa..2208b53c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1987,7 +1987,14 @@ public class NEUOverlay extends Gui { //Render tooltip JsonObject json = tooltipToDisplay.get(); if(json != null) { + ItemStack stack = manager.jsonToStack(json); + { + NBTTagCompound tag = stack.getTagCompound(); + tag.setBoolean("ItemList", true); + stack.setTagCompound(tag); + } + List<String> text = stack.getTooltip(Minecraft.getMinecraft().thePlayer, false); String internalname = json.get("internalname").getAsString(); |