[1.20.1] Incompatibility with Alex's Caves - Slabfishes freezes the game when spawned
thelegitdolt opened this issue · 0 comments
If you try to spawn a slabfish when Alex's Caves is installed, the game won't actually spawn a slabfish. I went through the entire entity constructor on debug mode to try to figure out a way to solve the issue, and I did! Yay!
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 other words, this mixin makes LivingEntity.isInWater()
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 uses their own getEyeHeight()
implementation, which calls isInWater()
.
This causes a crash.