aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-08-19 13:05:33 +0200
committerGitHub <noreply@github.com>2022-08-19 13:05:33 +0200
commitb2d35428ac089ac104a2ea8212d8332c27a6cbee (patch)
treea6a15ea7884844a8aeb35f768eb21d75227b6cef /src
parent5d2aa40fdee044c0579f426bff279b9d631e306f (diff)
downloadNotEnoughUpdates-b2d35428ac089ac104a2ea8212d8332c27a6cbee.tar.gz
NotEnoughUpdates-b2d35428ac089ac104a2ea8212d8332c27a6cbee.tar.bz2
NotEnoughUpdates-b2d35428ac089ac104a2ea8212d8332c27a6cbee.zip
Dumb bugs (#232)
* fixing experimentation solver * fixing neu buttons not resetting properly after disabling trophy reward overlay or accessory bag overlay * fixed ah overlay
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java8
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/TrophyRewardOverlay.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java7
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java4
6 files changed, 18 insertions, 12 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java
index b1ffcb2d..6b541256 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java
@@ -97,12 +97,12 @@ public class EnchantingSolvers {
}
String openChestName = Utils.getOpenChestName();
- if (!openChestName.contains("stakes")) {
- if (openChestName.startsWith("chronomatron")) {
+ if (!openChestName.contains("Stakes")) {
+ if (openChestName.startsWith("Chronomatron")) {
currentSolver = SolverType.CHRONOMATRON;
- } else if (openChestName.startsWith("ultrasequencer")) {
+ } else if (openChestName.startsWith("Ultrasequencer")) {
currentSolver = SolverType.ULTRASEQUENCER;
- } else if (openChestName.startsWith("superpairs")) {
+ } else if (openChestName.startsWith("Superpairs")) {
currentSolver = SolverType.SUPERPAIRS;
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java
index 513252dc..b6c3e763 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java
@@ -875,7 +875,7 @@ public class AccessoryBagOverlay {
private static boolean inAccessoryBag = false;
public static boolean isInAccessoryBag() {
- return inAccessoryBag;
+ return inAccessoryBag && NotEnoughUpdates.INSTANCE.config.accessoryBag.enableOverlay;
}
public static void renderOverlay() {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TrophyRewardOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TrophyRewardOverlay.java
index df635d5c..2b600d2e 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TrophyRewardOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TrophyRewardOverlay.java
@@ -31,7 +31,6 @@ import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiChest;
-import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ContainerChest;
@@ -78,7 +77,6 @@ public class TrophyRewardOverlay {
@SubscribeEvent(priority = EventPriority.LOW)
public void onItemTooltipLow(ItemTooltipEvent event) {
if (!inTrophyFishingInventory()) return;
- if (!NotEnoughUpdates.INSTANCE.config.fishing.trophyRewardTooltips) return;
ItemStack itemStack = event.itemStack;
if (itemStack == null) return;
@@ -100,7 +98,6 @@ public class TrophyRewardOverlay {
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onDrawBackground(GuiScreenEvent.BackgroundDrawnEvent event) {
if (!inTrophyFishingInventory()) return;
- if (!NotEnoughUpdates.INSTANCE.config.fishing.trophyRewardOverlay) return;
GuiScreen screen = Minecraft.getMinecraft().currentScreen;
if (!(screen instanceof GuiChest)) return;
@@ -263,6 +260,7 @@ public class TrophyRewardOverlay {
public static boolean inTrophyFishingInventory() {
if (!NotEnoughUpdates.INSTANCE.isOnSkyblock()) return false;
+ if (!NotEnoughUpdates.INSTANCE.config.fishing.trophyRewardOverlay) return false;
Minecraft minecraft = Minecraft.getMinecraft();
if (minecraft == null || minecraft.thePlayer == null) return false;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java
index ed1185ec..8ff3218a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java
@@ -58,7 +58,8 @@ public class AuctionSearchOverlay {
private static final ResourceLocation SEARCH_OVERLAY_TEXTURE_TAB_COMPLETED = new ResourceLocation(
"notenoughupdates:auc_search/ah_search_overlay_tab_completed.png");
private static final ResourceLocation STAR = new ResourceLocation("notenoughupdates:auc_search/star.png");
- private static final ResourceLocation MASTER_STAR = new ResourceLocation("notenoughupdates:auc_search/master_star.png");
+ private static final ResourceLocation MASTER_STAR =
+ new ResourceLocation("notenoughupdates:auc_search/master_star.png");
private static final ResourceLocation STAR_BOARD = new ResourceLocation("notenoughupdates:auc_search/star_board.png");
private static final GuiElementTextField textField = new GuiElementTextField("", 200, 20, 0);
@@ -105,7 +106,7 @@ public class AuctionSearchOverlay {
return false;
}
- String lastContainer = Utils.getOpenChestName();
+ String lastContainer = Utils.getLastOpenChestName();
if (!lastContainer.equals("Auctions Browser") && !lastContainer.startsWith("Auctions: ")) return false;
TileEntitySign tes = ((AccessorGuiEditSign) Minecraft.getMinecraft().currentScreen).getTileSign();
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
index 8bd7c581..74409648 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
@@ -26,7 +26,6 @@ import io.github.moulberry.notenoughupdates.listener.ScoreboardLocationChangeLis
import io.github.moulberry.notenoughupdates.miscfeatures.customblockzones.LocationChangeEvent;
import io.github.moulberry.notenoughupdates.overlays.SlayerOverlay;
import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiChest;
import net.minecraft.client.network.NetworkPlayerInfo;
import net.minecraft.init.Blocks;
@@ -93,6 +92,7 @@ public class SBInfo {
*/
@Deprecated
public String currentlyOpenChestName = "";
+ public String lastOpenChestName = "";
private long lastManualLocRaw = -1;
private long lastLocRaw = -1;
@@ -127,7 +127,8 @@ public class SBInfo {
private int tickCount = 0;
public String currentProfile = null;
- @SubscribeEvent
+ //Set the priority HIGH to allow other GuiOpenEvent's to use the new currentlyOpenChestName data
+ @SubscribeEvent(priority = EventPriority.HIGH)
public void onGuiOpen(GuiOpenEvent event) {
if (!NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) return;
@@ -136,6 +137,7 @@ public class SBInfo {
ContainerChest container = (ContainerChest) chest.inventorySlots;
currentlyOpenChestName = container.getLowerChestInventory().getDisplayName().getUnformattedText();
+ lastOpenChestName = currentlyOpenChestName;
} else {
currentlyOpenChestName = "";
}
@@ -230,6 +232,7 @@ public class SBInfo {
this.setLocation(null);
joinedWorld = System.currentTimeMillis();
currentlyOpenChestName = "";
+ lastOpenChestName = "";
hasNewTab = false;
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
index d7b80a0e..5b3ea853 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
@@ -1982,4 +1982,8 @@ public class Utils {
public static String getOpenChestName() {
return SBInfo.getInstance().currentlyOpenChestName;
}
+
+ public static String getLastOpenChestName() {
+ return SBInfo.getInstance().lastOpenChestName;
+ }
}