aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
index 20d6f4d5c..340e3b621 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
@@ -1,14 +1,12 @@
package at.hannibal2.skyhanni.data
-import at.hannibal2.skyhanni.events.LorenzTickEvent
-import at.hannibal2.skyhanni.events.PacketEvent
-import at.hannibal2.skyhanni.events.PlaySoundEvent
-import at.hannibal2.skyhanni.events.ReceiveParticleEvent
+import at.hannibal2.skyhanni.events.*
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzVec
import net.minecraft.client.Minecraft
import net.minecraft.network.play.server.S29PacketSoundEffect
import net.minecraft.network.play.server.S2APacketParticles
+import net.minecraftforge.event.world.WorldEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
@@ -32,6 +30,11 @@ class MinecraftData {
}
}
+ @SubscribeEvent
+ fun onWorldLoad(event: WorldEvent.Load) {
+ LorenzWorldSwitchEvent().postAndCatch()
+ }
+
@SubscribeEvent(receiveCanceled = true)
fun onParticlePacketReceive(event: PacketEvent.ReceiveEvent) {
if (!LorenzUtils.inSkyBlock) return