Mod Incompatibility due to unintended mixin behavior
thelegitdolt opened this issue · 1 comments
Alex's Caves has THIS entity mixin:
Which calls LivingEntity.getActiveEffects()
. getActiveEffects()
returns LivingEntity.activeEffects.values()
. LivingEntity.activeEffects
is null until it is initialized in the LivingEntity
constructor, so a null pointer is thrown. In oter words, LivingEntity.isInWater()
will now throw a null pointer if it is called before the LivingEntity
constructor is called.
The Entity
constructor, which is called before the LivingEntity
constructor, calls entity.getEyeHeight()
.
Slabfishes from the mod Environmental uses their own getEyeHeight()
implementation, which calls isInWater()
.
This causes a null pointer. To fix, you can use an accessor on activeEffects
and check if it is null before doing the contents of the mixin.