diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-09-15 18:31:44 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-09-15 18:31:44 +0200 |
commit | 18b1578d65e59944e721487a21adaf515491d522 (patch) | |
tree | 1650c1e8bf818f285220d9b108507f5ac00e0b14 /src/main/java | |
parent | 7d325ac7994c1b2e1ad96fbfa50f65d79b376567 (diff) | |
download | NotEnoughUpdates-18b1578d65e59944e721487a21adaf515491d522.tar.gz NotEnoughUpdates-18b1578d65e59944e721487a21adaf515491d522.tar.bz2 NotEnoughUpdates-18b1578d65e59944e721487a21adaf515491d522.zip |
Revert "I'm doing a dirty workaround because it's not working as expected, and I'm so annoyed by now that I don't care how it looks as long as it works."
This reverts commit 0f84f9627ae7298ec34415daf087c93880c3ad4e.
Diffstat (limited to 'src/main/java')
2 files changed, 3 insertions, 11 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java index 3a522c94..3dc59f8f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java @@ -52,12 +52,11 @@ import io.github.moulberry.notenoughupdates.miscgui.StorageOverlay; import io.github.moulberry.notenoughupdates.miscgui.TradeWindow; import io.github.moulberry.notenoughupdates.miscgui.TrophyRewardOverlay; import io.github.moulberry.notenoughupdates.miscgui.minionhelper.MinionHelperManager; -import io.github.moulberry.notenoughupdates.miscgui.minionhelper.render.MinionHelperOverlay; import io.github.moulberry.notenoughupdates.mixins.AccessorGuiContainer; import io.github.moulberry.notenoughupdates.options.NEUConfig; import io.github.moulberry.notenoughupdates.overlays.AuctionSearchOverlay; -import io.github.moulberry.notenoughupdates.overlays.BazaarSearchOverlay; import io.github.moulberry.notenoughupdates.overlays.EquipmentOverlay; +import io.github.moulberry.notenoughupdates.overlays.BazaarSearchOverlay; import io.github.moulberry.notenoughupdates.overlays.OverlayManager; import io.github.moulberry.notenoughupdates.overlays.RancherBootOverlay; import io.github.moulberry.notenoughupdates.overlays.TextOverlay; @@ -582,7 +581,6 @@ public class RenderListener { 36 / 256f, GL11.GL_NEAREST ); - MinionHelperOverlay.getInstance().render(); if (button.icon != null && !button.icon.trim().isEmpty()) { GuiInvButtonEditor.renderIcon(button.icon, x + 1, y + 1); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java index ce880c63..38f1c9e1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java @@ -52,12 +52,6 @@ import java.util.Map; public class MinionHelperOverlay { - public static MinionHelperOverlay getInstance() { - return instance; - } - - private static MinionHelperOverlay instance; - private final ResourceLocation minionOverlayImage = new ResourceLocation("notenoughupdates:minion_overlay.png"); private final ResourceLocation greenCheckImage = new ResourceLocation("notenoughupdates:dungeon_map/green_check.png"); private final ResourceLocation whiteCheckImage = new ResourceLocation("notenoughupdates:dungeon_map/white_check.png"); @@ -75,7 +69,6 @@ public class MinionHelperOverlay { private int currentPage = 0; public MinionHelperOverlay(MinionHelperManager manager) { - instance = this; this.manager = manager; hover = new MinionHelperOverlayHover(this, manager); } @@ -90,7 +83,8 @@ public class MinionHelperOverlay { cacheTotalPages = -1; } - public void render() { + @SubscribeEvent + public void onDrawBackground(GuiScreenEvent.BackgroundDrawnEvent event) { if (!manager.inCraftedMinionsInventory()) return; if (!NotEnoughUpdates.INSTANCE.config.minionHelper.gui) return; if (manager.isInvalidApiKey()) { |