diff options
author | DoKM <mcazzyman@gmail.com> | 2021-08-23 15:49:18 +0200 |
---|---|---|
committer | DoKM <mcazzyman@gmail.com> | 2021-08-23 15:49:18 +0200 |
commit | c8a7dfb175a667ba2a3aef5bfa1cafeb5df9ae8d (patch) | |
tree | 254e495bacb68c7fc79318ceec04fba829b6a61c | |
parent | 752e77d7407bfa7a0355677cd15d205fccf8d8f1 (diff) | |
download | NotEnoughUpdates-c8a7dfb175a667ba2a3aef5bfa1cafeb5df9ae8d.tar.gz NotEnoughUpdates-c8a7dfb175a667ba2a3aef5bfa1cafeb5df9ae8d.tar.bz2 NotEnoughUpdates-c8a7dfb175a667ba2a3aef5bfa1cafeb5df9ae8d.zip |
Stop pet exp display showing on itemlist pet
-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(); |