From 0f11b1bae06765aa60989337ec796504e599f809 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:25:13 +1000 Subject: Fix: No longer hide boss bars by accident (#1980) --- src/main/java/at/hannibal2/skyhanni/features/misc/HideFarEntities.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/HideFarEntities.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/HideFarEntities.kt index cde4acdf4..996273a64 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/HideFarEntities.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/HideFarEntities.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzUtils +import net.minecraft.entity.boss.EntityWither import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class HideFarEntities { @@ -30,7 +31,9 @@ class HideFarEntities { @SubscribeEvent fun onCheckRender(event: CheckRenderEntityEvent<*>) { - if (isEnabled() && event.entity.entityId in ignored) { + val entity = event.entity + if (entity is EntityWither && entity.entityId < 0) return + if (isEnabled() && entity.entityId in ignored) { event.cancel() } } -- cgit