aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorDoKM <mcazzyman@gmail.com>2021-07-08 21:35:15 +0200
committerDoKM <mcazzyman@gmail.com>2021-07-08 21:35:15 +0200
commitbe153178cb08229809a82c93e083a5f9572aa26b (patch)
tree864530afb87f488fb452f505d8e42cb79e9f1d73 /src/main
parent4013efcfc85e5ce4e16b2492d235373ed5caa958 (diff)
downloadNotEnoughUpdates-be153178cb08229809a82c93e083a5f9572aa26b.tar.gz
NotEnoughUpdates-be153178cb08229809a82c93e083a5f9572aa26b.tar.bz2
NotEnoughUpdates-be153178cb08229809a82c93e083a5f9572aa26b.zip
fix arrow key backpack option not doing anything
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java
index 32a7c76a..055db5ec 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java
@@ -117,23 +117,25 @@ public class InventoryStorageSelector {
return;
}
- if(KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.backpackHotkey)) {
- Minecraft.getMinecraft().thePlayer.inventory.currentItem = 0;
- isOverridingSlot = true;
- } else if(KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowLeftKey)) {
- selectedIndex--;
-
- int max = StorageManager.getInstance().storageConfig.displayToStorageIdMap.size()-1;
- if(selectedIndex > max) selectedIndex = max;
- if(selectedIndex < 0) selectedIndex = 0;
- } else if(KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowRightKey)) {
- selectedIndex++;
-
- int max = StorageManager.getInstance().storageConfig.displayToStorageIdMap.size()-1;
- if(selectedIndex > max) selectedIndex = max;
- if(selectedIndex < 0) selectedIndex = 0;
- } else if(KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowDownKey)) {
- sendToPage(selectedIndex);
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowKeyBackpacks) {
+ if (KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.backpackHotkey)) {
+ Minecraft.getMinecraft().thePlayer.inventory.currentItem = 0;
+ isOverridingSlot = true;
+ } else if (KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowLeftKey)) {
+ selectedIndex--;
+
+ int max = StorageManager.getInstance().storageConfig.displayToStorageIdMap.size() - 1;
+ if (selectedIndex > max) selectedIndex = max;
+ if (selectedIndex < 0) selectedIndex = 0;
+ } else if (KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowRightKey)) {
+ selectedIndex++;
+
+ int max = StorageManager.getInstance().storageConfig.displayToStorageIdMap.size() - 1;
+ if (selectedIndex > max) selectedIndex = max;
+ if (selectedIndex < 0) selectedIndex = 0;
+ } else if (KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowDownKey)) {
+ sendToPage(selectedIndex);
+ }
}
if(isSlotSelected()) {