diff --git a/src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java b/src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java index b3cfcff..de2657f 100644 --- a/src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java +++ b/src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java @@ -73,7 +73,7 @@ public static void setSentPlayerMessage(boolean sentPlayerMessage) { * @param event mouse event */ public void mouseEvent(MouseEvent event) { - if (!hasCoreMod || getShowDefaultToggle() || event.isCanceled()) + if (!hasCoreMod || getShowDefaultToggle() || event.isCanceled() || KeyBindings.scrollIgnore.isKeyDown()) return; // Scrolled if (event.getDwheel() != 0) { diff --git a/src/main/java/com/rolandoislas/multihotbar/data/KeyBindings.java b/src/main/java/com/rolandoislas/multihotbar/data/KeyBindings.java index ac12fbf..8627be4 100644 --- a/src/main/java/com/rolandoislas/multihotbar/data/KeyBindings.java +++ b/src/main/java/com/rolandoislas/multihotbar/data/KeyBindings.java @@ -26,16 +26,19 @@ public class KeyBindings { public static KeyBinding previousHotbar; public static boolean nextHotbarWasPressed; public static boolean previousHotbarWasPressed; + public static KeyBinding scrollIgnore; public static void load() { scrollModifier = new KeyBinding(getDescription("scrollModifier"), Keyboard.KEY_LMENU, CATEGORY_GENERAL); showDefaultHotbar = new KeyBinding(getDescription("showDefaultHotbar"), Keyboard.KEY_GRAVE, CATEGORY_GENERAL); nextHotbar = new KeyBinding(getDescription("nextHotbar"), Keyboard.KEY_X, CATEGORY_GENERAL); previousHotbar = new KeyBinding(getDescription("previousHotbar"), Keyboard.KEY_C, CATEGORY_GENERAL); + scrollIgnore = new KeyBinding(getDescription("scrollIgnore"), Keyboard.KEY_NONE, CATEGORY_GENERAL); ClientRegistry.registerKeyBinding(scrollModifier); ClientRegistry.registerKeyBinding(showDefaultHotbar); ClientRegistry.registerKeyBinding(nextHotbar); ClientRegistry.registerKeyBinding(previousHotbar); + ClientRegistry.registerKeyBinding(scrollIgnore); hotbarKeys = new ArrayList<>(); for (int slot = HotbarLogic.VANILLA_HOTBAR_SIZE + 1; slot <= InventoryPlayer.getHotbarSize(); slot++) { diff --git a/src/main/resources/assets/multihotbar/lang/en_US.lang b/src/main/resources/assets/multihotbar/lang/en_US.lang index ef15c61..28e5127 100644 --- a/src/main/resources/assets/multihotbar/lang/en_US.lang +++ b/src/main/resources/assets/multihotbar/lang/en_US.lang @@ -6,6 +6,7 @@ key.multihotbar.scrollModifier=Scroll Modifier key.multihotbar.showDefaultHotbar=Show Default Hotbar key.multihotbar.nextHotbar=Next Hotbar key.multihotbar.previousHotbar=Previous Hotbar +key.multihotbar.scrollIgnore=Ignore Scroll key.multihotbar.hotbarkey.10=Hotbar Slot 10 key.multihotbar.hotbarkey.11=Hotbar Slot 11 key.multihotbar.hotbarkey.12=Hotbar Slot 12