From 83b110a8d3582d1958ea86e6c02e6592ef8ee276 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 27 Mar 2022 00:38:32 +0200 Subject: [PATCH] Prevent sun blindness effect when leaving postals. Should fix #55 but can't really reproduce --- .../unicopia/entity/effect/SunBlindnessStatusEffect.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/effect/SunBlindnessStatusEffect.java b/src/main/java/com/minelittlepony/unicopia/entity/effect/SunBlindnessStatusEffect.java index 915a5704..54324ebf 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/effect/SunBlindnessStatusEffect.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/effect/SunBlindnessStatusEffect.java @@ -50,6 +50,11 @@ public class SunBlindnessStatusEffect extends StatusEffect { } public static boolean hasSunExposure(LivingEntity entity) { + + if (entity.hasNetherPortalCooldown()) { // TODO: test this. Entities shouldn't get sun blindness when existing a portal + return false; + } + if (entity.hasStatusEffect(StatusEffects.BLINDNESS)) { return false; }