End's Delight

End's Delight

16M Downloads

Crash with ticking entity

Maxi90909 opened this issue · 7 comments

commented

https://pastebin.com/qdmLsL8X

Crash upon joining a world

commented

Try Neruina mod, or I remembered that Forge has a "removeErroringTileEntities" option in forge.cfg file, turn it to "true", then turn it to "false" after it worked. I'm not sure if Fabric has this option.
I can't reproduce this issue yet, so I'm not sure about whether it is fixed in the existed versions. I'll release some versions for test, and if you want to help test these versions, please give me some feedbacks. It will help a lot, thanks!

commented

Thanks for your help!

commented

The issue is that the mod does not check that the attacking entity is an instance of LivingEntity before casting it to that.

LivingEntity attacker = (LivingEntity) source.getAttacker();

This can be easily fixed, by changing

if (id.equals(endMob)) {
    LivingEntity attacker = (LivingEntity) source.getAttacker();

to

if (id.equals(endMob) && source.getAttacker() instanceof LivingEntity attacker) {
commented

Try using ends_delight-1.20.1-2.2

commented

crash-2024-06-27_14.04.25-server.txt

Same crash like:

...cn.foggyhillside.ends_delight.item.DragonToothKnifeEvent$KnifeEvents.onAttackEndMobs(DragonToothKnifeEvent.java:17)...

commented

image
Fixed in this version?

commented

Yes