From aca189fe13935e641c0cac3b91693c6c3fcf91c7 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 12 Oct 2023 22:56:15 +0200 Subject: fixed globalRender description and replaced RenderWorldLastEvent with LorenzRenderWorldEvent --- .../at/hannibal2/skyhanni/features/mobs/AreaMiniBossFeatures.kt | 4 ++-- src/main/java/at/hannibal2/skyhanni/features/mobs/SpawnTimers.kt | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/mobs') 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 c09deb412..d603d97d6 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.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.withAlpha import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper @@ -17,7 +18,6 @@ import net.minecraft.entity.monster.EntityBlaze 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.fml.common.eventhandler.SubscribeEvent class AreaMiniBossFeatures { @@ -56,7 +56,7 @@ class AreaMiniBossFeatures { } @SubscribeEvent - fun onRenderWorld(event: RenderWorldLastEvent) { + fun onRenderWorld(event: LorenzRenderWorldEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.areaBossRespawnTimer) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/mobs/SpawnTimers.kt b/src/main/java/at/hannibal2/skyhanni/features/mobs/SpawnTimers.kt index a3c7d58ae..24a720508 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mobs/SpawnTimers.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mobs/SpawnTimers.kt @@ -3,16 +3,19 @@ package at.hannibal2.skyhanni.features.mobs import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PacketEvent -import at.hannibal2.skyhanni.utils.* +import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland +import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText +import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TimeUtils.format +import at.hannibal2.skyhanni.utils.toLorenzVec import net.minecraft.network.play.server.S2APacketParticles import net.minecraft.util.EnumParticleTypes -import net.minecraftforge.client.event.RenderWorldLastEvent import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds @@ -39,7 +42,7 @@ class SpawnTimers { } @SubscribeEvent - fun onRenderWorld(event: RenderWorldLastEvent) { + fun onRenderWorld(event: LorenzRenderWorldEvent) { if (!isEnabled()) return if (arachneSpawnTime.isInPast()) return val countDown = arachneSpawnTime.timeUntil() -- cgit