diff options
author | DoKM <mcazzyman@gmail.com> | 2021-08-24 18:41:42 +0200 |
---|---|---|
committer | DoKM <mcazzyman@gmail.com> | 2021-08-24 18:41:42 +0200 |
commit | 019f3630776c6f4b4eedd41c25aa4f36b99ccf5b (patch) | |
tree | a80f2ec8519c351860395684fc2be5beff6f2f23 | |
parent | 1ec8a4ebb6165b2e2983eb880b9ec0afc81ce57c (diff) | |
download | NotEnoughUpdates-019f3630776c6f4b4eedd41c25aa4f36b99ccf5b.tar.gz NotEnoughUpdates-019f3630776c6f4b4eedd41c25aa4f36b99ccf5b.tar.bz2 NotEnoughUpdates-019f3630776c6f4b4eedd41c25aa4f36b99ccf5b.zip |
Fix show pet exp on tooltip in pv
3 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index 4f3b6187..6aa292eb 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -2335,8 +2335,8 @@ 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")){ + if(event.itemStack.getTagCompound().hasKey("DisablePetExp")){ + if(event.itemStack.getTagCompound().getBoolean("DisablePetExp")){ return tooltipText; } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index 2208b53c..79a822d8 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1991,7 +1991,7 @@ public class NEUOverlay extends Gui { ItemStack stack = manager.jsonToStack(json); { NBTTagCompound tag = stack.getTagCompound(); - tag.setBoolean("ItemList", true); + tag.setBoolean("DisablePetExp", true); stack.setTagCompound(tag); } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java index 22cbf04d..51810c2d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -1496,7 +1496,14 @@ public class GuiProfileViewer extends GuiScreen { for(int i=petsPage*20; i<Math.min(petsPage*20+20, Math.min(sortedPetsStack.size(), sortedPets.size())); i++) { JsonObject pet = sortedPets.get(i); ItemStack stack = sortedPetsStack.get(i); + + if(pet != null) { + { + NBTTagCompound tag = stack.getTagCompound(); + tag.setBoolean("DisablePetExp", true); + stack.setTagCompound(tag); + } int xIndex = (i%20) % COLLS_XCOUNT; int yIndex = (i%20) / COLLS_XCOUNT; |