aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/features/dungeon/CloseChest.kt
diff options
context:
space:
mode:
authorAppability <appable@icloud.com>2022-10-12 20:48:51 -0700
committerAppability <appable@icloud.com>2022-10-12 20:48:51 -0700
commitc599ee0d78ed8bc17488636f2d9b9b1d5b6dd4a8 (patch)
treef362a5f60f31e27f1567c7319a78d861b19430a7 /src/main/kotlin/com/ambientaddons/features/dungeon/CloseChest.kt
parent03728b81851af00cd265fadd4ce6eaa3a8066dcb (diff)
downloadAmbientAddons-c599ee0d78ed8bc17488636f2d9b9b1d5b6dd4a8.tar.gz
AmbientAddons-c599ee0d78ed8bc17488636f2d9b9b1d5b6dd4a8.tar.bz2
AmbientAddons-c599ee0d78ed8bc17488636f2d9b9b1d5b6dd4a8.zip
uh a lot of things
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/features/dungeon/CloseChest.kt')
-rw-r--r--src/main/kotlin/com/ambientaddons/features/dungeon/CloseChest.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/kotlin/com/ambientaddons/features/dungeon/CloseChest.kt b/src/main/kotlin/com/ambientaddons/features/dungeon/CloseChest.kt
index ffaab8d..571cd7f 100644
--- a/src/main/kotlin/com/ambientaddons/features/dungeon/CloseChest.kt
+++ b/src/main/kotlin/com/ambientaddons/features/dungeon/CloseChest.kt
@@ -3,7 +3,8 @@ package com.ambientaddons.features.dungeon
import AmbientAddons.Companion.config
import AmbientAddons.Companion.mc
import com.ambientaddons.events.ReceivePacketEvent
-import com.ambientaddons.utils.LocationUtils
+import com.ambientaddons.utils.Area
+import com.ambientaddons.utils.SkyBlock
import net.minecraft.network.play.client.C0DPacketCloseWindow
import net.minecraft.network.play.server.S2DPacketOpenWindow
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -11,7 +12,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
object CloseChest {
@SubscribeEvent
fun onOpenWindow(event: ReceivePacketEvent) {
- if (!config.closeSecretChests || LocationUtils.location != "Catacombs") return
+ if (!config.closeSecretChests || SkyBlock.area != Area.Dungeon) return
if (event.packet !is S2DPacketOpenWindow) return
if (event.packet.windowTitle.unformattedText == "Chest") {
mc.netHandler.networkManager.sendPacket(C0DPacketCloseWindow(event.packet.windowId))