From 2e579fc0444724de51f1a4bb023e3b5278f3421b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 23 Mar 2024 18:45:22 +0100 Subject: moved makePickblock() from LorenzUtils to GuiContainerEvent --- .../at/hannibal2/skyhanni/events/GuiContainerEvent.kt | 15 ++++++++++++++- .../features/rift/area/westvillage/kloon/KloonHacking.kt | 1 - .../features/rift/everywhere/EnigmaSoulWaypoints.kt | 1 - src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 10 ---------- 4 files changed, 14 insertions(+), 13 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt index 74202594c..442603257 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiContainer import net.minecraft.inventory.Container import net.minecraft.inventory.Slot @@ -56,5 +57,17 @@ abstract class GuiContainerEvent(open val gui: GuiContainer, open val container: val slotId: Int, val clickedButton: Int, val clickType: Int, - ) : GuiContainerEvent(gui, container) + ) : GuiContainerEvent(gui, container) { + + + fun makePickblock() { + if (this.clickedButton == 2 && this.clickType == 3) return + slot?.slotNumber?.let { slotNumber -> + Minecraft.getMinecraft().playerController.windowClick( + container.windowId, slotNumber, 2, 3, Minecraft.getMinecraft().thePlayer + ) + isCanceled = true + } + } + } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt index 92e7dcd43..83890c360 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt @@ -16,7 +16,6 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzColor -import at.hannibal2.skyhanni.utils.LorenzUtils.makePickblock import at.hannibal2.skyhanni.utils.RenderUtils.highlight import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt index 754914190..34a19a01c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt @@ -14,7 +14,6 @@ import at.hannibal2.skyhanni.utils.InventoryUtils.getAllItems import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzColor -import at.hannibal2.skyhanni.utils.LorenzUtils.makePickblock import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index 269b543ba..0c267e6c0 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -282,16 +282,6 @@ object LorenzUtils { } } - fun GuiContainerEvent.SlotClickEvent.makePickblock() { - if (this.clickedButton == 2 && this.clickType == 3) return - slot?.slotNumber?.let { slotNumber -> - Minecraft.getMinecraft().playerController.windowClick( - container.windowId, slotNumber, 2, 3, Minecraft.getMinecraft().thePlayer - ) - isCanceled = true - } - } - private val recalculateDerpy = RecalculatingValue(1.seconds) { Perk.DOUBLE_MOBS_HP.isActive } -- cgit