diff options
author | J10a1n15 <45315647+j10a1n15@users.noreply.github.com> | 2024-07-07 11:25:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-07 11:25:13 +0200 |
commit | 63fe8d8986954ab8c274018e069957886503e5e6 (patch) | |
tree | b435103ed4a7c2961d10db24e91614e6601e2c6b /src/main/java/at/hannibal2/skyhanni/features | |
parent | bcbdf74c9563c555c767dc6ef26558152810e645 (diff) | |
download | skyhanni-63fe8d8986954ab8c274018e069957886503e5e6.tar.gz skyhanni-63fe8d8986954ab8c274018e069957886503e5e6.tar.bz2 skyhanni-63fe8d8986954ab8c274018e069957886503e5e6.zip |
Fix: Wardrobe Keybinds (#2198)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeKeybinds.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeKeybinds.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeKeybinds.kt index 2e3716cb2..502255afa 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeKeybinds.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeKeybinds.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.GuiKeyPressEvent import at.hannibal2.skyhanni.features.inventory.wardrobe.CustomWardrobe.clickSlot import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyClicked +import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.SimpleTimeMark import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -33,8 +34,8 @@ object CustomWardrobeKeybinds { if (!isEnabled()) return val slots = WardrobeAPI.slots.filter { it.isInCurrentPage() } - for ((key, index) in keybinds.withIndex().map { it.value to it.index }) { - if (!key.isKeyClicked()) continue + for ((index, key) in keybinds.withIndex()) { + if (!key.isKeyHeld()) continue if (lastClick.passedSince() < 200.milliseconds) break val slot = slots.getOrNull(index) ?: continue |