aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-06-03 15:25:13 +1000
committerGitHub <noreply@github.com>2024-06-03 07:25:13 +0200
commit0f11b1bae06765aa60989337ec796504e599f809 (patch)
tree95b9b29e554ae6353e27e33d68932bb6cfdd0779 /src/main/java/at/hannibal2
parent85ae301f2f3267d253d2c70d66294a98e2bdcd7e (diff)
downloadskyhanni-0f11b1bae06765aa60989337ec796504e599f809.tar.gz
skyhanni-0f11b1bae06765aa60989337ec796504e599f809.tar.bz2
skyhanni-0f11b1bae06765aa60989337ec796504e599f809.zip
Fix: No longer hide boss bars by accident (#1980)
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/HideFarEntities.kt5
1 files changed, 4 insertions, 1 deletions
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()
}
}