aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/mining
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-05-30 18:01:24 +1000
committerGitHub <noreply@github.com>2024-05-30 10:01:24 +0200
commitb2733f13841363c9417c0eb79d7240990eb36bcb (patch)
tree4b407da2aac70e8976f1731186b9f99fcd18d248 /src/main/java/at/hannibal2/skyhanni/features/mining
parent2fad00835fdb9d84a19c56c63a34c8a736a9aa5c (diff)
downloadskyhanni-b2733f13841363c9417c0eb79d7240990eb36bcb.tar.gz
skyhanni-b2733f13841363c9417c0eb79d7240990eb36bcb.tar.bz2
skyhanni-b2733f13841363c9417c0eb79d7240990eb36bcb.zip
Backend: Make skyhanni ReplaceItemEvent (#1866)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Co-authored-by: hannibal2 <24389977+hannibal002@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/mining')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt
index 94bb86d03..52549bee6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt
@@ -11,6 +11,7 @@ import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.IslandChangeEvent
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
+import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor
import at.hannibal2.skyhanni.utils.ConditionalUtils
@@ -19,7 +20,6 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
import at.hannibal2.skyhanni.utils.NEUItems.getItemStack
import at.hannibal2.skyhanni.utils.ParkourHelper
-import io.github.moulberry.notenoughupdates.events.ReplaceItemEvent
import io.github.moulberry.notenoughupdates.util.Utils
import net.minecraft.client.player.inventory.ContainerLocalMenu
import net.minecraftforge.fml.common.eventhandler.EventPriority
@@ -123,8 +123,8 @@ class DeepCavernsGuide {
@SubscribeEvent
fun replaceItem(event: ReplaceItemEvent) {
if (show) return
- if (event.inventory is ContainerLocalMenu && showStartIcon && event.slotNumber == 49) {
- event.replaceWith(startIcon)
+ if (event.inventory is ContainerLocalMenu && showStartIcon && event.slot == 49) {
+ event.replace(startIcon)
}
}