aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2024-08-01 00:33:49 +1000
committerGitHub <noreply@github.com>2024-07-31 16:33:49 +0200
commit2f7968721361b6667bf6bb9d69310b532aff668f (patch)
treecdf4918ce3ae4626409dc843e17e5c4e2556e713
parent141b06ea48188d7442427a0574f97eeb24b62bf9 (diff)
downloadnotenoughupdates-2f7968721361b6667bf6bb9d69310b532aff668f.tar.gz
notenoughupdates-2f7968721361b6667bf6bb9d69310b532aff668f.tar.bz2
notenoughupdates-2f7968721361b6667bf6bb9d69310b532aff668f.zip
meta: Fix stack overflow for second pet option (#1283)
* Fix stack overflow if the pet item wasnt being rendered * forgot about second pet
-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 8cc5fb45..7fe8d7d1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
@@ -705,9 +705,6 @@ public class PetInfoOverlay extends TextOverlay {
int y = (int) position.y + (overlayStrings.size() - secondPetLines) * 10;
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) {
@@ -720,6 +717,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);