diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt index 9ce83c23a..c38e20dee 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt @@ -30,6 +30,7 @@ object InventoryUtils { } } + // TODO add cache that persists until the next gui/window open/close packet is sent/received fun openInventoryName() = Minecraft.getMinecraft().currentScreen.let { if (it is GuiChest) { val chest = it.inventorySlots as ContainerChest diff --git a/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt index a776de1b9..335ac1202 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt @@ -25,6 +25,11 @@ object KeyboardManager { fun isCopyingKeysDown() = isModifierKeyDown() && Keyboard.KEY_C.isKeyHeld() fun isModifierKeyDown() = if (SystemUtils.IS_OS_MAC) isCommandKeyDown() else isControlKeyDown() + + /** + * TODO make use of this function unnecessary: Try to avoid using `isModifierKeyDown` as the only option, + * allow the user to set a different option instead and just set the default key to isModifierKeyDown + */ fun getModifierKeyName(): String = if (SystemUtils.IS_OS_MAC) "Command" else "Control" @SubscribeEvent |