aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io')
-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()) {