aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-09-09 13:20:12 +0200
committerLorenz <lo.scherf@gmail.com>2022-09-09 13:20:12 +0200
commit0e7363d2c24902ec2817cf47f2cfe8510a0544c3 (patch)
treeb5cd24ae9c0bd9c9319ca3246e76fc1b3fbede6b /src/main/java
parenta7b4a4697f2ce7b612fba3e46f2d74e242922b83 (diff)
downloadNotEnoughUpdates-0e7363d2c24902ec2817cf47f2cfe8510a0544c3.tar.gz
NotEnoughUpdates-0e7363d2c24902ec2817cf47f2cfe8510a0544c3.tar.bz2
NotEnoughUpdates-0e7363d2c24902ec2817cf47f2cfe8510a0544c3.zip
code cleanup
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/MinionHelperManager.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/MinionHelperApiLoader.java15
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/repo/MinionHelperRepoLoader.java10
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java3
4 files changed, 17 insertions, 13 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/MinionHelperManager.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/MinionHelperManager.java
index 67b974a5..50a267a4 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/MinionHelperManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/MinionHelperManager.java
@@ -85,7 +85,7 @@ public class MinionHelperManager {
}
public boolean notReady() {
- return !repo.isRepoReadyToUse() || !api.isApiReadyToUse();
+ return !repo.isReadyToUse() || !api.isReadyToUse();
}
public Minion getMinionById(String internalName) {
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 15bcb1f0..3b3ed64c 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
@@ -49,7 +49,7 @@ public class MinionHelperApiLoader {
private int ticks = 0;
private boolean collectionApiEnabled = true;
private boolean ignoreWorldSwitches = false;
- private boolean apiReadyToUse = false;
+ private boolean readyToUse = false;
private ApiData apiData = null;
private boolean notifyNoCollectionApi = false;
private long lastLoaded = 0;
@@ -84,6 +84,7 @@ public class MinionHelperApiLoader {
}
private void load() {
+ System.out.println("load");
lastLoaded = System.currentTimeMillis();
EntityPlayerSP thePlayer = Minecraft.getMinecraft().thePlayer;
if (thePlayer == null) return;
@@ -103,6 +104,7 @@ public class MinionHelperApiLoader {
}
private void updateInformation(JsonObject entireApiResponse) {
+ System.out.println("updateInformation");
if (!entireApiResponse.has("success") || !entireApiResponse.get("success").getAsBoolean()) return;
JsonArray profiles = entireApiResponse.getAsJsonArray("profiles");
for (JsonElement element : profiles) {
@@ -122,6 +124,7 @@ public class MinionHelperApiLoader {
}
private void readData(JsonObject player, JsonObject members) {
+ System.out.println("readData");
int magesReputation = 0;
int barbariansReputation = 0;
if (player.has("nether_island_player_data")) {
@@ -145,7 +148,7 @@ public class MinionHelperApiLoader {
);
manager.reloadData();
- apiReadyToUse = true;
+ readyToUse = true;
}
private int loadPeltCount(JsonObject player) {
@@ -249,12 +252,12 @@ public class MinionHelperApiLoader {
public void setDirty() {
dirty = true;
- apiReadyToUse = false;
+ readyToUse = false;
}
public void prepareProfileSwitch() {
ignoreWorldSwitches = true;
- apiReadyToUse = false;
+ readyToUse = false;
}
public void onProfileSwitch() {
@@ -264,8 +267,8 @@ public class MinionHelperApiLoader {
collectionApiEnabled = true;
}
- public boolean isApiReadyToUse() {
- return apiReadyToUse;
+ public boolean isReadyToUse() {
+ return readyToUse;
}
public ApiData getApiData() {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/repo/MinionHelperRepoLoader.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/repo/MinionHelperRepoLoader.java
index 943e8cf8..49dac537 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/repo/MinionHelperRepoLoader.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/repo/MinionHelperRepoLoader.java
@@ -45,7 +45,7 @@ public class MinionHelperRepoLoader {
private final MinionHelperManager manager;
private boolean dirty = true;
private int ticks = 0;
- private boolean repoReadyToUse = false;
+ private boolean readyToUse = false;
private final MinionHelperRepoMinionLoader minionLoader;
boolean errorWhileLoading = false;
@@ -89,7 +89,7 @@ public class MinionHelperRepoLoader {
testForMissingData();
manager.reloadData();
- repoReadyToUse = true;
+ readyToUse = true;
if (errorWhileLoading) {
Utils.showOutdatedRepoNotification();
@@ -209,10 +209,10 @@ public class MinionHelperRepoLoader {
public void setDirty() {
dirty = true;
- repoReadyToUse = false;
+ readyToUse = false;
}
- public boolean isRepoReadyToUse() {
- return repoReadyToUse;
+ public boolean isReadyToUse() {
+ return readyToUse;
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java
index 6b6ea6dc..dce9f7a9 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java
@@ -70,7 +70,8 @@ public class MinionHelperOverlayHover {
OverviewLine mouseObject = overlay.getObjectOverMouse(renderMap);
if (mouseObject != null) {
Utils.drawHoveringText(getTooltip(mouseObject), mouseX, mouseY,
- scaledWidth, scaledHeight, -1, Minecraft.getMinecraft().fontRendererObj);
+ scaledWidth, scaledHeight, -1, Minecraft.getMinecraft().fontRendererObj
+ );
}
renderToggleButton();