aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/features/AutoSwapToPickBlock.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2022-03-22 19:59:22 -0400
committerbowser0000 <bowser0000@gmail.com>2022-03-22 19:59:22 -0400
commitdce1af627f2f9f10bb21f83b976c2b6008975fdf (patch)
tree5efedc31d43e1505c0eb48dd9480e8f7873dd045 /src/main/java/me/Danker/features/AutoSwapToPickBlock.java
parent71f48e9cf2f250a2ddf5444ccce5d0ebd6487e4a (diff)
downloadSkyblockMod-dce1af627f2f9f10bb21f83b976c2b6008975fdf.tar.gz
SkyblockMod-dce1af627f2f9f10bb21f83b976c2b6008975fdf.tar.bz2
SkyblockMod-dce1af627f2f9f10bb21f83b976c2b6008975fdf.zip
Add new f7 terminals
Also remove maze terminal
Diffstat (limited to 'src/main/java/me/Danker/features/AutoSwapToPickBlock.java')
-rw-r--r--src/main/java/me/Danker/features/AutoSwapToPickBlock.java25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/main/java/me/Danker/features/AutoSwapToPickBlock.java b/src/main/java/me/Danker/features/AutoSwapToPickBlock.java
index ccabbce..9a4c839 100644
--- a/src/main/java/me/Danker/features/AutoSwapToPickBlock.java
+++ b/src/main/java/me/Danker/features/AutoSwapToPickBlock.java
@@ -1,6 +1,7 @@
package me.Danker.features;
import me.Danker.commands.ToggleCommand;
+import me.Danker.utils.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiChest;
import net.minecraft.client.settings.GameSettings;
@@ -17,6 +18,8 @@ public class AutoSwapToPickBlock {
@SubscribeEvent
public void onGuiOpen(GuiOpenEvent event) {
+ if (!ToggleCommand.swapToPickBlockToggled || !Utils.inSkyblock) return;
+
Minecraft mc = Minecraft.getMinecraft();
GameSettings gameSettings = mc.gameSettings;
if (event.gui instanceof GuiChest) {
@@ -25,18 +28,16 @@ public class AutoSwapToPickBlock {
IInventory inventory = ((ContainerChest) containerChest).getLowerChestInventory();
String inventoryName = inventory.getDisplayName().getUnformattedText();
- if (ToggleCommand.swapToPickBlockToggled) {
- if (inventoryName.startsWith("Chronomatron (") || inventoryName.startsWith("Superpairs (") || inventoryName.startsWith("Ultrasequencer (") || inventoryName.startsWith("What starts with:") || inventoryName.startsWith("Select all the") || inventoryName.startsWith("Navigate the maze!") || inventoryName.startsWith("Correct all the panes!") || inventoryName.startsWith("Click in order!") || inventoryName.startsWith("Harp -")) {
- if (!pickBlockBindSwapped) {
- pickBlockBind = gameSettings.keyBindPickBlock.getKeyCode();
- gameSettings.keyBindPickBlock.setKeyCode(-100);
- pickBlockBindSwapped = true;
- }
- } else {
- if (pickBlockBindSwapped) {
- gameSettings.keyBindPickBlock.setKeyCode(pickBlockBind);
- pickBlockBindSwapped = false;
- }
+ if (inventoryName.startsWith("Chronomatron (") || inventoryName.startsWith("Superpairs (") || inventoryName.startsWith("Ultrasequencer (") || inventoryName.startsWith("What starts with:") || inventoryName.startsWith("Select all the") || inventoryName.startsWith("Change all to same color!") || inventoryName.startsWith("Correct all the panes!") || inventoryName.startsWith("Click in order!") || inventoryName.startsWith("Click the button on time!") || inventoryName.startsWith("Harp -")) {
+ if (!pickBlockBindSwapped) {
+ pickBlockBind = gameSettings.keyBindPickBlock.getKeyCode();
+ gameSettings.keyBindPickBlock.setKeyCode(-100);
+ pickBlockBindSwapped = true;
+ }
+ } else {
+ if (pickBlockBindSwapped) {
+ gameSettings.keyBindPickBlock.setKeyCode(pickBlockBind);
+ pickBlockBindSwapped = false;
}
}
}