From a5f669c4ec0692efd0e532d23156ea260718c0ee Mon Sep 17 00:00:00 2001 From: Moulberry Date: Sat, 29 Aug 2020 02:32:19 +1000 Subject: 1.2.3 --- .../infopanes/CollectionLogInfoPane.java | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/infopanes/CollectionLogInfoPane.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/CollectionLogInfoPane.java b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/CollectionLogInfoPane.java index 2912c6bd..0302d74a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/CollectionLogInfoPane.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/CollectionLogInfoPane.java @@ -303,7 +303,7 @@ public class CollectionLogInfoPane extends ScrollableInfoPane { itemFramebufferGrayscale.bindFramebufferTexture(); - AtomicReference tooltipToDisplay = new AtomicReference<>(null); + AtomicReference tooltipToDisplay = new AtomicReference<>(null); AtomicBoolean isTop = new AtomicBoolean(false); AtomicInteger lowestY = new AtomicInteger(-1); @@ -326,7 +326,7 @@ public class CollectionLogInfoPane extends ScrollableInfoPane { if(mouseX > leftI && mouseX < rightI) { if(mouseY > topI && mouseY < bottomI) { - tooltipToDisplay.set(manager.getItemInformation().get(internalname)); + tooltipToDisplay.set(manager.jsonToStack(manager.getItemInformation().get(internalname), true)); } } @@ -360,16 +360,9 @@ public class CollectionLogInfoPane extends ScrollableInfoPane { itemFramebufferGrayscale.unbindFramebufferTexture(); - JsonObject json = tooltipToDisplay.get(); - if(json != null) { - List text = new ArrayList<>(); - text.add(json.get("displayname").getAsString()); - JsonArray lore = json.get("lore").getAsJsonArray(); - - for(int i=0; i text = displayStack.getTooltip(Minecraft.getMinecraft().thePlayer, true); Utils.drawHoveringText(text, mouseX, mouseY, width, height, -1, Minecraft.getMinecraft().fontRendererObj); } } -- cgit