Well, this bug appears for all mobs that have their readAdditionalSaveData(CompoundTag) method overriden + a call to readPersistentAngerSaveData which casts the Level to a ServerLevel. As renderers are client sided executing this method's code causes a ClassCastException (ClientLevel cannot be cast to ServerLevel).
Well, this bug appears for all mobs that have their readAdditionalSaveData(CompoundTag) method overriden + a call to readPersistentAngerSaveData which casts the Level to a ServerLevel. As renderers are client sided executing this method's code causes a ClassCastException (ClientLevel cannot be cast to ServerLevel).
A simple server side check should fix the bug.