diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-25 03:45:22 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-25 03:45:22 +0200 |
| commit | de61fd6bccbea2a3ceca5a0707a3176938f24ead (patch) | |
| tree | 22296db71bf825818091453a441102e726aa1e50 /src/main/java/at/hannibal2/skyhanni/features/rift | |
| parent | 6b4c633716f6998461d701f7c841a16e59c1794b (diff) | |
| download | skyhanni-de61fd6bccbea2a3ceca5a0707a3176938f24ead.tar.gz skyhanni-de61fd6bccbea2a3ceca5a0707a3176938f24ead.tar.bz2 skyhanni-de61fd6bccbea2a3ceca5a0707a3176938f24ead.zip | |
Using LorenzWorldChangeEvent everywhere
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift')
5 files changed, 9 insertions, 14 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftTimer.kt index 29919e940..e9aa4726e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftTimer.kt @@ -2,12 +2,12 @@ package at.hannibal2.skyhanni.features.rift import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzActionBarEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.TimeUtils -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class RiftTimer { @@ -18,7 +18,7 @@ class RiftTimer { private val changes = mutableMapOf<Long, String>() @SubscribeEvent - fun onJoinWorld(ignored: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { display = emptyList() maxTime = 0 latestTime = 0 diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt index 6818eb4b0..18c7deff2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt @@ -3,10 +3,7 @@ package at.hannibal2.skyhanni.features.rift import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.data.TitleUtils -import at.hannibal2.skyhanni.events.EntityClickEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.ReceiveParticleEvent -import at.hannibal2.skyhanni.events.withAlpha +import at.hannibal2.skyhanni.events.* import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled @@ -32,7 +29,6 @@ import net.minecraft.util.EnumParticleTypes import net.minecraftforge.client.event.RenderLivingEvent import net.minecraftforge.client.event.RenderWorldLastEvent import net.minecraftforge.event.entity.living.LivingDeathEvent -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.milliseconds @@ -339,7 +335,7 @@ object VampireSlayerFeatures { @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { entityList.clear() taggedEntityList.clear() standList.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt index 74e9b2ae9..b012f46d4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.rift.area.colosseum import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.withAlpha import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper @@ -9,7 +10,6 @@ import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraftforge.event.entity.living.LivingDeathEvent -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.awt.Color @@ -33,7 +33,7 @@ class BlobbercystsHighlight { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { if (!isEnabled()) return entityList.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt index dc12c0c22..5b9b0cd8f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt @@ -10,7 +10,6 @@ import at.hannibal2.skyhanni.utils.jsonobjects.DanceRoomInstructionsJson import kotlinx.coroutines.* import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraft.util.AxisAlignedBB -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object DanceRoomHelper { @@ -79,7 +78,7 @@ object DanceRoomHelper { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { inRoom = false } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt index 5af25554e..b67755d7b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.rift.area.stillgorechateau import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldSwitchEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.events.ScoreboardRawChangeEvent import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI @@ -31,7 +31,7 @@ class RiftBloodEffigies { private val effigiesTimerPattern = "§eRespawn §c(?<time>.*) §7\\(or click!\\)".toPattern() @SubscribeEvent - fun onWorldSwitch(event: LorenzWorldSwitchEvent) { + fun onWorldChange(event: LorenzWorldChangeEvent) { effigiesTimes = mapOf( 0 to -1L, 1 to -1L, |
