From 7839e0f489b48468f7ce4dc71400523581f03c1a Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Sat, 23 Mar 2024 18:45:05 +0100 Subject: Backend: Removal of Neu's SlotClickEvent (#1206) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../features/rift/area/westvillage/kloon/KloonHacking.kt | 6 +++--- .../skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift') 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 4ecfa459c..92e7dcd43 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,11 +16,11 @@ 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 import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import io.github.moulberry.notenoughupdates.events.SlotClickEvent import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -110,9 +110,9 @@ class KloonHacking { } @SubscribeEvent(priority = EventPriority.HIGH) - fun onSlotClick(event: SlotClickEvent) { + fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) { if (!inTerminalInventory || !RiftAPI.inRift()) return - event.usePickblockInstead() + event.makePickblock() } @SubscribeEvent 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 cc489c777..754914190 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,13 +14,13 @@ 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 import at.hannibal2.skyhanni.utils.RenderUtils.highlight import at.hannibal2.skyhanni.utils.StringUtils.removeColor import io.github.moulberry.notenoughupdates.events.ReplaceItemEvent -import io.github.moulberry.notenoughupdates.events.SlotClickEvent import io.github.moulberry.notenoughupdates.util.Utils import net.minecraft.client.gui.inventory.GuiChest import net.minecraft.client.player.inventory.ContainerLocalMenu @@ -80,11 +80,11 @@ object EnigmaSoulWaypoints { } @SubscribeEvent(priority = EventPriority.HIGH) - fun onSlotClick(event: SlotClickEvent) { + fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) { if (!inInventory || !isEnabled()) return if (event.slotId == 31 && inventoryUnfound.isNotEmpty()) { - event.usePickblockInstead() + event.makePickblock() if (adding) { trackedSouls.addAll(inventoryUnfound) adding = false @@ -94,10 +94,10 @@ object EnigmaSoulWaypoints { } } - if (event.slot.stack == null) return + if (event.slot?.stack == null) return val split = event.slot.stack.displayName.split("Enigma: ") if (split.size == 2) { - event.usePickblockInstead() + event.makePickblock() if (soulLocations.contains(split.last())) { if (!trackedSouls.contains(split.last())) { ChatUtils.chat("§5Tracking the ${split.last()} Enigma Soul!", prefixColor = "§5") -- cgit