diff options
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()) { |