Prevent sun blindness effect when leaving postals. Should fix #55 but can't really reproduce

This commit is contained in:
Sollace 2022-03-27 00:38:32 +02:00
parent 26b0f3567e
commit 83b110a8d3

View file

@ -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;
}