aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java10
2 files changed, 11 insertions, 3 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 063aa862..046ef3b5 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java
@@ -51,11 +51,12 @@ 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.EquipmentOverlay;
import io.github.moulberry.notenoughupdates.overlays.BazaarSearchOverlay;
+import io.github.moulberry.notenoughupdates.overlays.EquipmentOverlay;
import io.github.moulberry.notenoughupdates.overlays.OverlayManager;
import io.github.moulberry.notenoughupdates.overlays.RancherBootOverlay;
import io.github.moulberry.notenoughupdates.overlays.TextOverlay;
@@ -573,6 +574,7 @@ 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 38f1c9e1..ce880c63 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,6 +52,12 @@ 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");
@@ -69,6 +75,7 @@ public class MinionHelperOverlay {
private int currentPage = 0;
public MinionHelperOverlay(MinionHelperManager manager) {
+ instance = this;
this.manager = manager;
hover = new MinionHelperOverlayHover(this, manager);
}
@@ -83,8 +90,7 @@ public class MinionHelperOverlay {
cacheTotalPages = -1;
}
- @SubscribeEvent
- public void onDrawBackground(GuiScreenEvent.BackgroundDrawnEvent event) {
+ public void render() {
if (!manager.inCraftedMinionsInventory()) return;
if (!NotEnoughUpdates.INSTANCE.config.minionHelper.gui) return;
if (manager.isInvalidApiKey()) {