mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 23:27:59 +01:00
Prevent sun blindness effect when leaving postals. Should fix #55 but can't really reproduce
This commit is contained in:
parent
26b0f3567e
commit
83b110a8d3
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue