aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-02-06 03:03:57 +0100
committernea <nea@nea.moe>2023-02-08 23:10:42 +0100
commit31812d03e7c4aa47a76cb9bcc3c67406f4fc1a43 (patch)
tree65fa30ca1c51cc7db2738aa8722beba1ca3b5114 /src/main/java
parent208b4980887fa4e977f60a99804d4df4036d03ed (diff)
downloadNotEnoughUpdates-31812d03e7c4aa47a76cb9bcc3c67406f4fc1a43.tar.gz
NotEnoughUpdates-31812d03e7c4aa47a76cb9bcc3c67406f4fc1a43.tar.bz2
NotEnoughUpdates-31812d03e7c4aa47a76cb9bcc3c67406f4fc1a43.zip
MinionHelper: Only load minion helper data when needed
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/MinionHelperApiLoader.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/MinionHelperApiLoader.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/MinionHelperApiLoader.java
index aaa398f4..ecf02236 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/MinionHelperApiLoader.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/MinionHelperApiLoader.java
@@ -47,7 +47,6 @@ import java.util.Map;
public class MinionHelperApiLoader {
private final MinionHelperManager manager;
private boolean dirty = true;
- private int ticks = 0;
private boolean collectionApiEnabled = true;
private boolean ignoreWorldSwitches = false;
private boolean readyToUse = false;
@@ -72,11 +71,7 @@ public class MinionHelperApiLoader {
if (Minecraft.getMinecraft().thePlayer == null) return;
if (!NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) return;
if (!NotEnoughUpdates.INSTANCE.config.minionHelper.gui) return;
- ticks++;
-
- if (ticks % 20 != 0) return;
-
- if (dirty) {
+ if (dirty && "Crafted Minions".equals(Utils.getOpenChestName())) {
load();
} else {
if (System.currentTimeMillis() > lastLoaded + 60_000 * 3) {