diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-03-07 21:46:17 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-07 11:46:17 +0100 |
commit | 7facd340b6e51d862a9e32977e56a7b0f69f3da0 (patch) | |
tree | 977d9d9c01518f660ed1b461e1ff2d3fc51d2612 /src/main/java/at/hannibal2/skyhanni/features/slayer | |
parent | 1181ef837104b4a5f68de6cf5793b21ad7573e03 (diff) | |
download | skyhanni-7facd340b6e51d862a9e32977e56a7b0f69f3da0.tar.gz skyhanni-7facd340b6e51d862a9e32977e56a7b0f69f3da0.tar.bz2 skyhanni-7facd340b6e51d862a9e32977e56a7b0f69f3da0.zip |
Backend: Use less forge events (#1085)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/slayer')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt | 4 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt index 74505b19e..eab95363b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt @@ -1,11 +1,11 @@ package at.hannibal2.skyhanni.features.slayer import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand -import net.minecraftforge.client.event.RenderLivingEvent import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.regex.Pattern @@ -46,7 +46,7 @@ class HideMobNames { } @SubscribeEvent(priority = EventPriority.HIGH) - fun onRenderLiving(event: RenderLivingEvent.Specials.Pre<EntityLivingBase>) { + fun onRenderLiving(event: SkyHanniRenderEntityEvent.Specials.Pre<EntityLivingBase>) { if (!LorenzUtils.inSkyBlock) return if (!SkyHanniMod.feature.slayer.hideMobNames) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt index 38022adf7..474afc6cf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt @@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent import at.hannibal2.skyhanni.events.withAlpha import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper @@ -40,7 +41,6 @@ import net.minecraft.client.renderer.GlStateManager import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand import net.minecraft.util.EnumParticleTypes -import net.minecraftforge.client.event.RenderLivingEvent import net.minecraftforge.event.entity.living.LivingDeathEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.milliseconds @@ -259,7 +259,7 @@ object VampireSlayerFeatures { } @SubscribeEvent - fun pre(event: RenderLivingEvent.Pre<EntityOtherPlayerMP>) { + fun pre(event: SkyHanniRenderEntityEvent.Pre<EntityOtherPlayerMP>) { if (!isEnabled()) return if (!config.seeThrough) return if (entityList.contains(event.entity) && event.entity.canBeSeen()) { @@ -268,7 +268,7 @@ object VampireSlayerFeatures { } @SubscribeEvent - fun pre(event: RenderLivingEvent.Post<EntityOtherPlayerMP>) { + fun post(event: SkyHanniRenderEntityEvent.Post<EntityOtherPlayerMP>) { if (!isEnabled()) return if (!config.seeThrough) return if (entityList.contains(event.entity) && event.entity.canBeSeen()) { |