aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscgui
diff options
context:
space:
mode:
authornopothegamer <40329022+nopothegamer@users.noreply.github.com>2021-07-22 09:42:35 +1000
committerGitHub <noreply@github.com>2021-07-22 09:42:35 +1000
commit8d9aeb9e47eba0ef4275b64592bc6dcd7696e0f9 (patch)
tree8bdff2cfe3dc071978576c816f5f29ab39a2284a /src/main/java/io/github/moulberry/notenoughupdates/miscgui
parent87058a95f50768ccbd1b1fed0a8f0600bf81304e (diff)
parentaebc16a2a5ca9c20affc27eb5a45cd9a95085168 (diff)
downloadnotenoughupdates-8d9aeb9e47eba0ef4275b64592bc6dcd7696e0f9.tar.gz
notenoughupdates-8d9aeb9e47eba0ef4275b64592bc6dcd7696e0f9.tar.bz2
notenoughupdates-8d9aeb9e47eba0ef4275b64592bc6dcd7696e0f9.zip
Merge pull request #1 from DoKM/master
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
index b8d6dc38..2dd0fbd1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
@@ -40,6 +40,7 @@ import org.lwjgl.util.vector.Vector4f;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.awt.*;
+import java.awt.event.KeyEvent;
import java.util.*;
import java.util.List;
@@ -1439,7 +1440,9 @@ public class StorageOverlay extends GuiElement {
if(!(Minecraft.getMinecraft().currentScreen instanceof GuiChest)) return false;
int dWheel = Mouse.getEventDWheel();
- if(dWheel != 0) {
+ if(dWheel != 0 &&
+ (((NotEnoughUpdates.INSTANCE.config.storageGUI.scrollLock == 0)||
+ (NotEnoughUpdates.INSTANCE.config.storageGUI.scrollLock == 1 && !KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.slotLockKey))))) {
if(dWheel < 0) {
dWheel = -1;
if(scrollVelocity > 0) scrollVelocity = 0;