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 | |
parent | 6b4c633716f6998461d701f7c841a16e59c1794b (diff) | |
download | skyhanni-de61fd6bccbea2a3ceca5a0707a3176938f24ead.tar.gz skyhanni-de61fd6bccbea2a3ceca5a0707a3176938f24ead.tar.bz2 skyhanni-de61fd6bccbea2a3ceca5a0707a3176938f24ead.zip |
Using LorenzWorldChangeEvent everywhere
Diffstat (limited to 'src')
51 files changed, 89 insertions, 136 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 diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzWorldChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/LorenzWorldChangeEvent.kt new file mode 100644 index 000000000..35f9ddd63 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/events/LorenzWorldChangeEvent.kt @@ -0,0 +1,3 @@ +package at.hannibal2.skyhanni.events + +class LorenzWorldChangeEvent() : LorenzEvent()
\ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzWorldSwitchEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/LorenzWorldSwitchEvent.kt deleted file mode 100644 index 503e0fd3c..000000000 --- a/src/main/java/at/hannibal2/skyhanni/events/LorenzWorldSwitchEvent.kt +++ /dev/null @@ -1,3 +0,0 @@ -package at.hannibal2.skyhanni.events - -class LorenzWorldSwitchEvent() : LorenzEvent()
\ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt index ca73f8557..ead79267c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.TitleUtils import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.name @@ -17,7 +18,6 @@ import io.github.moulberry.notenoughupdates.NotEnoughUpdates import io.github.moulberry.notenoughupdates.recipes.CraftingRecipe import net.minecraft.client.Minecraft import net.minecraft.item.ItemStack -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -33,7 +33,7 @@ class MinionCraftHelper { private val alreadyNotified = mutableListOf<String>() @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { alreadyNotified.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt index 41d30a331..637ca543e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt @@ -2,10 +2,7 @@ package at.hannibal2.skyhanni.features.damageindicator import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.ScoreboardData -import at.hannibal2.skyhanni.events.BossHealthChangeEvent -import at.hannibal2.skyhanni.events.DamageIndicatorDetectedEvent -import at.hannibal2.skyhanni.events.DamageIndicatorFinalBossEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.* import at.hannibal2.skyhanni.features.dungeon.DungeonData import at.hannibal2.skyhanni.features.slayer.blaze.HellionShield import at.hannibal2.skyhanni.features.slayer.blaze.setHellionShield @@ -29,7 +26,6 @@ import net.minecraft.entity.passive.EntityWolf import net.minecraftforge.client.event.RenderLivingEvent import net.minecraftforge.client.event.RenderWorldLastEvent import net.minecraftforge.event.entity.EntityJoinWorldEvent -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 @@ -84,7 +80,7 @@ class DamageIndicatorManager { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { mobFinder = MobFinder() data.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt index 49673a208..254a3d607 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt @@ -8,7 +8,6 @@ import net.minecraft.client.Minecraft import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraft.entity.item.EntityArmorStand import net.minecraft.entity.monster.EntityGuardian -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class DungeonCleanEnd { @@ -39,7 +38,7 @@ class DungeonCleanEnd { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { bossDone = false chestsSpawned = false lastBossId = -1 diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt index bb3be6d0d..48664b835 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt @@ -6,7 +6,6 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.StringUtils.matchRegex import net.minecraft.entity.item.EntityArmorStand -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class DungeonCopilot { @@ -115,7 +114,7 @@ class DungeonCopilot { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { changeNextStep("") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonData.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonData.kt index f96788ce0..883f2649f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonData.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonData.kt @@ -1,14 +1,10 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.data.ScoreboardData -import at.hannibal2.skyhanni.events.DungeonBossRoomEnterEvent -import at.hannibal2.skyhanni.events.DungeonEnterEvent -import at.hannibal2.skyhanni.events.DungeonStartEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.* import at.hannibal2.skyhanni.utils.LorenzUtils.equalsOneOf import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -69,7 +65,7 @@ class DungeonData { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { dungeonFloor = null started = false inBossRoom = false diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt index bf25d664f..e13dbcdb1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt @@ -4,10 +4,10 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.DungeonStartEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.StringUtils.matchRegex -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class DungeonDeathCounter { @@ -79,7 +79,7 @@ class DungeonDeathCounter { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { deaths = 0 update() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt index f1c80062f..5f82207bb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt @@ -11,7 +11,6 @@ import at.hannibal2.skyhanni.utils.getLorenzVec import net.minecraft.entity.item.EntityArmorStand import net.minecraft.entity.item.EntityItem import net.minecraft.util.EnumParticleTypes -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class DungeonHideItems { @@ -234,7 +233,7 @@ class DungeonHideItems { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { hideParticles.clear() movingSkeletonSkulls.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt index 4daaf4dbf..b35fd6f3f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.utils.BlockUtils.getBlockStateAt import at.hannibal2.skyhanni.utils.EntityUtils @@ -13,7 +14,6 @@ import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraft.entity.item.EntityArmorStand import net.minecraft.potion.Potion import net.minecraft.util.AxisAlignedBB -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.awt.Color @@ -60,7 +60,7 @@ object DungeonLividFinder { } @SubscribeEvent - fun onWorldLoad(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { livid = null gotBlinded = false } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt index 5bdc812fc..5797c0935 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt @@ -4,10 +4,10 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.DungeonStartEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.StringUtils.matchRegex -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.concurrent.fixedRateTimer @@ -71,7 +71,7 @@ class DungeonMilestonesDisplay { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { display = "" currentMilestone = 0 } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt index 3e427bb4b..99aa135bb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt @@ -17,7 +17,6 @@ import at.hannibal2.skyhanni.utils.RenderUtils.drawString import net.minecraft.client.Minecraft import net.minecraft.init.Blocks import net.minecraftforge.client.event.RenderWorldLastEvent -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object GriffinBurrowHelper { @@ -104,7 +103,7 @@ object GriffinBurrowHelper { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { guessLocation = null targetLocation = null animationLocation = null diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt index ced9a3a5b..47ba57337 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt @@ -11,7 +11,6 @@ import at.hannibal2.skyhanni.utils.toLorenzVec import net.minecraft.init.Blocks import net.minecraft.item.ItemStack import net.minecraft.network.play.server.S2APacketParticles -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -143,7 +142,7 @@ class GriffinBurrowParticleFinder { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { burrows.clear() recentlyDugParticleBurrows.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt index ffa73b345..ec0df954e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.TitleUtils import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PacketEvent import at.hannibal2.skyhanni.utils.* import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy @@ -16,7 +17,6 @@ import net.minecraft.client.Minecraft import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraft.network.play.server.S02PacketChat import net.minecraftforge.event.entity.EntityJoinWorldEvent -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.InputEvent @@ -60,7 +60,7 @@ object InquisitorWaypointShare { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { waypoints = emptyMap() inquisitorsNearby = emptyList() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt index f9a1ea4e9..079d6cecf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.event.diana import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.events.SoopyGuessBurrowEvent @@ -9,7 +10,6 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.toLorenzVec import net.minecraft.util.EnumParticleTypes -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.math.* @@ -37,7 +37,7 @@ class SoopyGuessBurrow { var distance2: Double? = null @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { lastDing = 0L lastDingPitch = 0f firstPitch = 0f diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt index 0a51cbd92..af1660def 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt @@ -26,7 +26,6 @@ import net.minecraft.client.Minecraft import net.minecraft.item.ItemStack import net.minecraft.network.play.client.C09PacketHeldItemChange import net.minecraft.util.AxisAlignedBB -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent import kotlin.time.Duration.Companion.seconds @@ -78,7 +77,7 @@ object GardenAPI { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { SkyHanniMod.coroutineScope.launch { delay(2.seconds) withContext(MinecraftDispatcher) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt index e6c924baa..ce36238e2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.events.GardenToolChangeEvent import at.hannibal2.skyhanni.events.GuiRenderEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PreProfileSwitchEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI @@ -15,7 +16,6 @@ import at.hannibal2.skyhanni.utils.TimeUtils import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent import java.util.* @@ -36,7 +36,7 @@ class FarmingWeightDisplay { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { // We want to try to connect to the api again after a world switch. apiError = false // We ask both api endpoints after every world switch diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt index 5a80e45a4..c17ebf721 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt @@ -2,10 +2,7 @@ package at.hannibal2.skyhanni.features.garden.visitor import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.TitleUtils -import at.hannibal2.skyhanni.events.CropClickEvent -import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent -import at.hannibal2.skyhanni.events.VisitorArrivalEvent +import at.hannibal2.skyhanni.events.* import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.test.command.CopyErrorCommand import at.hannibal2.skyhanni.utils.RenderUtils.renderString @@ -13,7 +10,6 @@ import at.hannibal2.skyhanni.utils.SoundUtils import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.TabListData import at.hannibal2.skyhanni.utils.TimeUtils -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.concurrent.fixedRateTimer import kotlin.math.roundToLong @@ -150,7 +146,7 @@ class GardenVisitorTimer { } @SubscribeEvent - fun onWorldLoad(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { lastVisitors = -1 GardenAPI.config?.nextSixthVisitorArrival?.let { sixthVisitorArrivalTime = it diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt index a287662bc..4892546bf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt @@ -2,12 +2,12 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiContainerEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.RenderUtils.highlight import at.hannibal2.skyhanni.utils.RenderUtils.interpolate import net.minecraft.item.ItemStack import net.minecraftforge.client.event.ClientChatReceivedEvent -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.awt.Color import kotlin.time.* @@ -65,7 +65,7 @@ class HighlightBonzoMasks { } @SubscribeEvent - fun onJoinWorld(ignored: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { maskTimers.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt index 6d32d7b1c..6d2d5c4e4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt @@ -4,10 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.Storage import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.ProfileStorageData -import at.hannibal2.skyhanni.events.InventoryCloseEvent -import at.hannibal2.skyhanni.events.InventoryOpenEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.MinionOpenEvent +import at.hannibal2.skyhanni.events.* import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.* import at.hannibal2.skyhanni.utils.ItemUtils.getLore @@ -26,7 +23,6 @@ import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.client.event.GuiScreenEvent import net.minecraftforge.client.event.RenderLivingEvent import net.minecraftforge.client.event.RenderWorldLastEvent -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.InputEvent @@ -190,7 +186,7 @@ class MinionFeatures { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { lastClickedEntity = null lastMinion = null lastMinionOpened = 0L diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ChickenHeadTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ChickenHeadTimer.kt index 89e54fbb8..ad4ba25ed 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/ChickenHeadTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ChickenHeadTimer.kt @@ -3,12 +3,12 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.TimeUtils -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -29,7 +29,7 @@ class ChickenHeadTimer { } @SubscribeEvent - fun onWorldLoad(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { lastTime = System.currentTimeMillis() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ChumBucketHider.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ChumBucketHider.kt index 98934941f..c4c071a19 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/ChumBucketHider.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ChumBucketHider.kt @@ -3,13 +3,13 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.ConfigLoadEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.onToggle import at.hannibal2.skyhanni.utils.getLorenzVec import net.minecraft.entity.Entity import net.minecraft.entity.item.EntityArmorStand -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class ChumBucketHider { @@ -18,7 +18,7 @@ class ChumBucketHider { private val hiddenEntities = mutableListOf<Entity>() @SubscribeEvent - fun onWorldLoad(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { reset() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt index dbc241584..664c0a42d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt @@ -4,10 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.ScoreboardData -import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent +import at.hannibal2.skyhanni.events.* import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy @@ -16,7 +13,6 @@ import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.concurrent.fixedRateTimer @@ -42,7 +38,7 @@ class FrozenTreasureTracker { } @SubscribeEvent - fun onWorldLoad(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { icePerHour = 0 stoppedChecks = 0 icePerMin.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt index 565b9728a..6ed5918bb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt @@ -1,16 +1,12 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.RenderMobColoredEvent -import at.hannibal2.skyhanni.events.ResetEntityHurtEvent -import at.hannibal2.skyhanni.events.withAlpha +import at.hannibal2.skyhanni.events.* import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraft.client.Minecraft import net.minecraft.client.entity.EntityOtherPlayerMP -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -110,7 +106,7 @@ class MarkedPlayerManager { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { if (Minecraft.getMinecraft().thePlayer == null) return markedPlayers.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt index 29cbfb837..3ba0acceb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt @@ -13,7 +13,6 @@ import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.TimeUnit import at.hannibal2.skyhanni.utils.TimeUtils import net.minecraft.network.play.server.S47PacketPlayerListHeaderFooter -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 @@ -138,7 +137,7 @@ class NonGodPotEffectDisplay { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { checkFooter = true } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt index 514a883b4..f8e0eef47 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LorenzColor @@ -13,7 +14,6 @@ import at.hannibal2.skyhanni.utils.RenderUtils.drawString import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor import net.minecraftforge.client.event.RenderWorldLastEvent -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -64,7 +64,7 @@ class PatcherSendCoordinates { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { patcherBeacon.clear() logger.log("Reset everything (world change)") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ThunderSparksHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ThunderSparksHighlight.kt index 5c1e56d51..7b6e2887b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/ThunderSparksHighlight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ThunderSparksHighlight.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.* import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt @@ -10,7 +11,6 @@ import at.hannibal2.skyhanni.utils.RenderUtils.drawString import net.minecraft.entity.item.EntityArmorStand import net.minecraft.init.Blocks import net.minecraftforge.client.event.RenderWorldLastEvent -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent import java.awt.Color @@ -55,7 +55,7 @@ class ThunderSparksHighlight { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { sparks.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/TpsCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/TpsCounter.kt index fc742e0a1..864bdde72 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/TpsCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/TpsCounter.kt @@ -2,11 +2,11 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PacketEvent import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.RenderUtils.renderString -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.concurrent.fixedRateTimer @@ -67,7 +67,7 @@ class TpsCounter { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { tpsList.clear() packetsFromLastSecond = 0 ignoreFirstTicks = waitAfterWorldSwitch diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt index 06ca27355..bf23419bf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.SkyHanniMod.Companion.consoleLog import at.hannibal2.skyhanni.SkyHanniMod.Companion.coroutineScope import at.hannibal2.skyhanni.SkyHanniMod.Companion.feature import at.hannibal2.skyhanni.events.ConfigLoadEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.onToggle import com.google.gson.JsonObject @@ -13,7 +14,6 @@ import com.jagrosh.discordipc.IPCClient import com.jagrosh.discordipc.IPCListener import com.jagrosh.discordipc.entities.RichPresence import kotlinx.coroutines.launch -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent import net.minecraftforge.fml.common.network.FMLNetworkEvent @@ -160,7 +160,7 @@ object DiscordRPCManager : IPCListener { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { val executor: ScheduledExecutorService = Executors.newSingleThreadScheduledExecutor() executor.schedule( { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt index f7fa64628..f73f2a406 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.data.TitleUtils import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.withAlpha import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper @@ -24,7 +25,6 @@ import net.minecraft.client.gui.inventory.GuiInventory import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.client.event.RenderWorldLastEvent -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 @@ -223,7 +223,7 @@ class TrevorFeatures { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { TrevorSolver.resetLocation() currentStatus = TrapperStatus.READY currentLabel = "§2Ready" diff --git a/src/main/java/at/hannibal2/skyhanni/features/mobs/AreaMiniBossFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/mobs/AreaMiniBossFeatures.kt index 09f125dbf..8c1a2dd24 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mobs/AreaMiniBossFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mobs/AreaMiniBossFeatures.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.mobs import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.withAlpha import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.utils.* @@ -13,7 +14,6 @@ import net.minecraft.entity.monster.EntityEnderman import net.minecraft.entity.monster.EntityZombie import net.minecraft.entity.passive.EntityWolf import net.minecraftforge.client.event.RenderWorldLastEvent -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class AreaMiniBossFeatures { @@ -71,7 +71,7 @@ class AreaMiniBossFeatures { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { miniBossType = null } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt index 417dff187..73e774f81 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazes.kt @@ -1,10 +1,7 @@ package at.hannibal2.skyhanni.features.nether.ashfang import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent -import at.hannibal2.skyhanni.events.RenderMobColoredEvent -import at.hannibal2.skyhanni.events.ResetEntityHurtEvent -import at.hannibal2.skyhanni.events.withAlpha +import at.hannibal2.skyhanni.events.* import at.hannibal2.skyhanni.features.damageindicator.BossType import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager import at.hannibal2.skyhanni.utils.EntityUtils @@ -15,7 +12,6 @@ import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand import net.minecraft.entity.monster.EntityBlaze import net.minecraftforge.client.event.RenderLivingEvent -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 @@ -106,7 +102,7 @@ class AshfangBlazes { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { blazeColor.clear() blazeArmorStand.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt index 8c1a6647d..76bf8a1c8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.nether.ashfang import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.features.damageindicator.BossType import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled @@ -9,7 +10,6 @@ import at.hannibal2.skyhanni.utils.EntityUtils.hasSkullTexture import at.hannibal2.skyhanni.utils.RenderUtils.drawString import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.client.event.RenderWorldLastEvent -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent import java.awt.Color @@ -50,7 +50,7 @@ class AshfangBlazingSouls { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { souls.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt index aaff418a9..70328e12b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.nether.ashfang import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.features.damageindicator.BossType import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager import at.hannibal2.skyhanni.utils.* @@ -8,7 +9,6 @@ import at.hannibal2.skyhanni.utils.EntityUtils.hasSkullTexture import at.hannibal2.skyhanni.utils.RenderUtils.drawString import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.client.event.RenderWorldLastEvent -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent import java.awt.Color @@ -48,7 +48,7 @@ class AshfangGravityOrbs { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { orbs.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangNextResetCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangNextResetCooldown.kt index 7cd114d69..c2290a0f2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangNextResetCooldown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangNextResetCooldown.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.nether.ashfang import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.features.damageindicator.BossType import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager import at.hannibal2.skyhanni.utils.EntityUtils @@ -10,7 +11,6 @@ import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.TimeUnit import at.hannibal2.skyhanni.utils.TimeUtils import net.minecraft.entity.item.EntityArmorStand -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent @@ -47,7 +47,7 @@ class AshfangNextResetCooldown { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { spawnTime = -1 } 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, diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt index 389c68ce8..0deb4fdea 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt @@ -6,13 +6,13 @@ import at.hannibal2.skyhanni.data.SlayerAPI import at.hannibal2.skyhanni.data.TitleUtils import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.StringUtils.matchRegex import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.getLorenzVec import net.minecraft.entity.EntityLivingBase -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -116,7 +116,7 @@ class SlayerQuestWarning { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { if (!needSlayerQuest) { dirtySidebar = true } diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt index fb577cfce..609eb6737 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt @@ -3,10 +3,7 @@ package at.hannibal2.skyhanni.features.slayer.enderman import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.TitleUtils -import at.hannibal2.skyhanni.events.CheckRenderEntityEvent -import at.hannibal2.skyhanni.events.RenderMobColoredEvent -import at.hannibal2.skyhanni.events.ServerBlockChangeEvent -import at.hannibal2.skyhanni.events.withAlpha +import at.hannibal2.skyhanni.events.* import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.* import at.hannibal2.skyhanni.utils.EntityUtils.getBlockInHand @@ -19,7 +16,6 @@ import net.minecraft.entity.item.EntityArmorStand import net.minecraft.entity.monster.EntityEnderman import net.minecraft.init.Blocks import net.minecraftforge.client.event.RenderWorldLastEvent -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -126,7 +122,7 @@ class EndermanSlayerFeatures { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { endermenWithBeacons.clear() flyingBeacons.clear() nukekebiSkulls.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt index 54e95cb2b..faac1563b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt @@ -10,7 +10,6 @@ import net.minecraft.entity.EntityLiving import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.client.event.RenderLivingEvent -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 @@ -148,7 +147,7 @@ class SummoningMobManager { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { despawned() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt index 52cd428d6..aeb434170 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.summonings import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.EntityUtils.getNameTagWith import at.hannibal2.skyhanni.utils.EntityUtils.hasSkullTexture @@ -13,7 +14,6 @@ import net.minecraft.client.Minecraft import net.minecraft.entity.EntityLiving import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.client.event.RenderWorldLastEvent -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -86,7 +86,7 @@ class SummoningSoulsName { } @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { souls.clear() mobsLastLocation.clear() mobsName.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderLivingEntityHelper.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderLivingEntityHelper.kt index 530b37b6f..805b48af2 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderLivingEntityHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderLivingEntityHelper.kt @@ -1,15 +1,15 @@ package at.hannibal2.skyhanni.mixins.hooks +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.RenderMobColoredEvent import at.hannibal2.skyhanni.events.ResetEntityHurtEvent import net.minecraft.entity.EntityLivingBase -import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class RenderLivingEntityHelper { @SubscribeEvent - fun onWorldChange(event: WorldEvent.Load) { + fun onWorldChange(event: LorenzWorldChangeEvent) { entityColorMap.clear() entityColorCondition.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt b/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt index fc5a9d727..c1eb9a265 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt @@ -75,7 +75,7 @@ class TabListData { // class TabListPlayer(var displayName: String, var internalName: String) // @SubscribeEvent -// fun onWorldChange(event: WorldEvent.Load) { +// fun onWorldChange(event: LorenzWorldChangeEvent) { // uuidMap.clear() // tabListMap.clear() // } |