aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/mixins
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2024-02-22 21:15:35 +0100
committerGitHub <noreply@github.com>2024-02-22 21:15:35 +0100
commita9263a24a55396739e4bbfd7af7119863dc1e953 (patch)
tree9390c28f111e5c8ac81c412e58de2a8ec380a967 /src/main/java/at/hannibal2/skyhanni/mixins
parentdf9710ee23a3497f13e6ab810e34111151d6de85 (diff)
downloadskyhanni-a9263a24a55396739e4bbfd7af7119863dc1e953.tar.gz
skyhanni-a9263a24a55396739e4bbfd7af7119863dc1e953.tar.bz2
skyhanni-a9263a24a55396739e4bbfd7af7119863dc1e953.zip
Added not fully completed tasks in Way to gain SkyBlock Xp menus. #974
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/mixins')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiContainerHook.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiContainerHook.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiContainerHook.kt
index a09d8d923..d855c6e5a 100644
--- a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiContainerHook.kt
+++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiContainerHook.kt
@@ -40,7 +40,7 @@ class GuiContainerHook(guiAny: Any) {
}
fun onMouseClick(slot: Slot?, slotId: Int, clickedButton: Int, clickType: Int, ci: CallbackInfo) {
- if (SlotClickEvent(gui, gui.inventorySlots, slot, slotId, clickedButton, clickType).postAndCatch()) ci.cancel()
+ if (SlotClickEvent(gui, gui.inventorySlots, gui.inventorySlots?.inventory?.takeIf { it.size > slotId && slotId >= 0 }?.get(slotId), slot, slotId, clickedButton, clickType).postAndCatch()) ci.cancel()
}
fun onDrawScreenAfter(
@@ -50,4 +50,4 @@ class GuiContainerHook(guiAny: Any) {
) {
if (DrawScreenAfterEvent(mouseX, mouseY, ci).postAndCatch()) ci.cancel()
}
-} \ No newline at end of file
+}