Eldritch Mobs

Eldritch Mobs

6M Downloads

[CRASH] Server crashing when loading chunk with a modified mob by Eldritch

Opened this issue · 2 comments

commented

Hello there,

Here's the crash report :
crash-2022-07-30_17.35.44-server.txt

I don't know how to fix it, and dunno if it's a compatibility issue... Thanks in advance

commented

Another user reported a similar crash also caused by an unsafe cast in Eldritch Mobs.
https://mclo.gs/qfWUPTf

Here’s the code that’s the issue. This is checking if the player is a PlayerEntity but not a ServerPlayerEntity. So this is doing an unsafe cast to ServerPlayerEntity without actually checking if the player is an actual ServerPlayerEntity.

((ServerPlayerEntity) target).networkHandler.sendPacket(new EntityVelocityUpdateS2CPacket(target.getId(),

changing these similar if statements throughout the mod from instanceof PlayerEntity to instanceof ServerPlayerEntity should stop these casting crashes for good

commented

Fixed in the latest release for 1.18.2.