aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-03-23 18:45:22 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-03-23 18:45:22 +0100
commit2e579fc0444724de51f1a4bb023e3b5278f3421b (patch)
treebbbfdc28e19937323c3edaa8a9a7a3218b4d14b2 /src/main/java/at
parent7839e0f489b48468f7ce4dc71400523581f03c1a (diff)
downloadskyhanni-2e579fc0444724de51f1a4bb023e3b5278f3421b.tar.gz
skyhanni-2e579fc0444724de51f1a4bb023e3b5278f3421b.tar.bz2
skyhanni-2e579fc0444724de51f1a4bb023e3b5278f3421b.zip
moved makePickblock() from LorenzUtils to GuiContainerEvent
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt15
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt10
4 files changed, 14 insertions, 13 deletions
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 }