From 16121c35b05073144a208f786e4f006497df50bb Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Tue, 26 Sep 2023 19:06:00 +1000 Subject: Hide not clickable items bypass key #504 Adds the ability to bypass not clickable items when holding the control key. --- .../at/hannibal2/skyhanni/config/features/InventoryConfig.java | 8 +++++++- .../skyhanni/features/inventory/HideNotClickableItems.kt | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java index 42fabffea..ff2f95a8f 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java @@ -42,7 +42,13 @@ public class InventoryConfig { public int hideNotClickableOpacity = 180; @Expose - @ConfigOption(name = "Green line", desc = "Adds green line around items that are clickable.") + @ConfigOption(name = "Bypass With Control", desc = "Adds the ability to bypass not clickable items when holding the control key.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean notClickableItemsBypass = true; + + @Expose + @ConfigOption(name = "Green Line", desc = "Adds green line around items that are clickable.") @ConfigEditorBoolean @ConfigAccordionId(id = 0) public boolean hideNotClickableItemsGreenLine = true; diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt index d0e51d176..e28ebee04 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt @@ -81,6 +81,7 @@ class HideNotClickableItems { fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) { if (!LorenzUtils.inSkyBlock) return if (isDisabled()) return + if (SkyHanniMod.feature.inventory.notClickableItemsBypass && LorenzUtils.isControlKeyDown()) return if (event.gui !is GuiChest) return val guiChest = event.gui val chest = guiChest.inventorySlots as ContainerChest @@ -134,6 +135,7 @@ class HideNotClickableItems { fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) { if (isDisabled()) return if (!SkyHanniMod.feature.inventory.hideNotClickableItemsBlockClicks) return + if (SkyHanniMod.feature.inventory.notClickableItemsBypass && LorenzUtils.isControlKeyDown()) return if (event.gui !is GuiChest) return val chestName = InventoryUtils.openInventoryName() -- cgit