aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2024-07-30 04:51:45 +1000
committerGitHub <noreply@github.com>2024-07-29 20:51:45 +0200
commitb2fa8e0277650441da5cdd83e0a53a32854625f3 (patch)
treee6abe801ff8e5a80cb89730ac9151f616716492d
parentccdae8cf68308b89754d47bd6dfa1dba80a10d0b (diff)
downloadnotenoughupdates-b2fa8e0277650441da5cdd83e0a53a32854625f3.tar.gz
notenoughupdates-b2fa8e0277650441da5cdd83e0a53a32854625f3.tar.bz2
notenoughupdates-b2fa8e0277650441da5cdd83e0a53a32854625f3.zip
Fix rendering issues due to the pet item icon (#1278)
Fix stack overflow if the pet item wasnt being rendered
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
index 7f453446..8cc5fb45 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
@@ -673,9 +673,6 @@ public class PetInfoOverlay extends TextOverlay {
int y = (int) position.y;
ItemStack stack = NotEnoughUpdates.INSTANCE.manager.jsonToStack(petHeldItem);
- GlStateManager.enableDepth();
- GlStateManager.pushMatrix();
- Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.locationedit.guiScale);
int counter = 0;
for (String line : overlayStrings) {
@@ -688,6 +685,9 @@ public class PetInfoOverlay extends TextOverlay {
return;
}
+ GlStateManager.enableDepth();
+ GlStateManager.pushMatrix();
+ Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.locationedit.guiScale);
GlStateManager.translate(x + 77, y + (10 * counter) + 2 - backgroundOffset, 0);
Utils.drawItemStack(stack, 0, 0);
Utils.pushGuiScale(0);