diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-03-23 18:45:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-23 18:45:05 +0100 |
commit | 7839e0f489b48468f7ce4dc71400523581f03c1a (patch) | |
tree | 2b2371024ebcca5fb0b84f34a0a6a296cceb5e0c /src/main/java/at/hannibal2/skyhanni/features/rift | |
parent | c03d6b26f0d5a8e1d99b5e8f49de0d3aa87969a9 (diff) | |
download | skyhanni-7839e0f489b48468f7ce4dc71400523581f03c1a.tar.gz skyhanni-7839e0f489b48468f7ce4dc71400523581f03c1a.tar.bz2 skyhanni-7839e0f489b48468f7ce4dc71400523581f03c1a.zip |
Backend: Removal of Neu's SlotClickEvent (#1206)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt | 10 |
2 files changed, 8 insertions, 8 deletions
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") |