aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-25 03:45:22 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-25 03:45:22 +0200
commitde61fd6bccbea2a3ceca5a0707a3176938f24ead (patch)
tree22296db71bf825818091453a441102e726aa1e50 /src/main/java/at/hannibal2/skyhanni/data
parent6b4c633716f6998461d701f7c841a16e59c1794b (diff)
downloadskyhanni-de61fd6bccbea2a3ceca5a0707a3176938f24ead.tar.gz
skyhanni-de61fd6bccbea2a3ceca5a0707a3176938f24ead.tar.bz2
skyhanni-de61fd6bccbea2a3ceca5a0707a3176938f24ead.zip
Using LorenzWorldChangeEvent everywhere
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/EntityData.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt3
5 files changed, 8 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
index e64f09403..14d102a50 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent
import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent
+import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.PacketEvent
import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.baseMaxHealth
@@ -15,7 +16,6 @@ import net.minecraft.entity.item.EntityItem
import net.minecraft.entity.item.EntityItemFrame
import net.minecraft.entity.item.EntityXPOrb
import net.minecraft.network.play.server.S1CPacketEntityMetadata
-import net.minecraftforge.event.world.WorldEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
@@ -39,7 +39,7 @@ class EntityData {
}
@SubscribeEvent
- fun onWorldChange(event: WorldEvent.Load) {
+ fun onWorldChange(event: LorenzWorldChangeEvent) {
maxHealthMap.clear()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt
index b5a2d2b92..abab3c002 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt
@@ -1,11 +1,11 @@
package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.events.EntityMoveEvent
+import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.getLorenzVec
import net.minecraft.entity.Entity
-import net.minecraftforge.event.world.WorldEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
@@ -39,7 +39,7 @@ class EntityMovementData {
}
@SubscribeEvent
- fun onWorldChange(event: WorldEvent.Load) {
+ fun onWorldChange(event: LorenzWorldChangeEvent) {
entityLocation.clear()
}
} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
index 84f8503e6..f8b0cfed3 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
@@ -7,7 +7,6 @@ import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.TabListData
import net.minecraft.client.Minecraft
-import net.minecraftforge.event.world.WorldEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.network.FMLNetworkEvent
@@ -36,7 +35,7 @@ class HypixelData {
private var loggerIslandChange = LorenzLogger("debug/island_change")
@SubscribeEvent
- fun onWorldChange(event: WorldEvent.Load) {
+ fun onWorldChange(event: LorenzWorldChangeEvent) {
skyBlock = false
joinedWorld = System.currentTimeMillis()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
index 340e3b621..a68a0af70 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
@@ -31,8 +31,8 @@ class MinecraftData {
}
@SubscribeEvent
- fun onWorldLoad(event: WorldEvent.Load) {
- LorenzWorldSwitchEvent().postAndCatch()
+ fun onWorldChange(event: WorldEvent.Load) {
+ LorenzWorldChangeEvent().postAndCatch()
}
@SubscribeEvent(receiveCanceled = true)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt
index c7cc0c745..8b55ab189 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt
@@ -6,7 +6,6 @@ import at.hannibal2.skyhanni.events.*
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
-import net.minecraftforge.event.world.WorldEvent
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
@@ -29,7 +28,7 @@ object ProfileStorageData {
}
@SubscribeEvent(priority = EventPriority.HIGHEST)
- fun onWorldChange(event: WorldEvent.Load) {
+ fun onWorldChange(event: LorenzWorldChangeEvent) {
val profileName = nextProfile ?: return
nextProfile = null