Tome of Blood

Tome of Blood

6M Downloads

[1.16.5-1.2] Crash when hitting non-LivingEntity with Sentient Harm

Aresiel opened this issue ยท 4 comments

commented
[12Sept2021 18:42:48.058] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
net.minecraft.crash.ReportedException: Ticking entity
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:855) ~[?:?]
	at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:291) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:787) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:642) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232) ~[?:?]
	at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.ClassCastException: class net.minecraft.entity.item.EnderCrystalEntity cannot be cast to class net.minecraft.entity.LivingEntity (net.minecraft.entity.item.EnderCrystalEntity and net.minecraft.entity.LivingEntity are in unnamed module of loader cpw.mods.modlauncher.TransformingClassLoader @4239262e)
	at com.minttea.minecraft.tomeofblood.common.items.SentientHarmEffect.onResolve(SentientHarmEffect.java:55) ~[tomeofblood:1.16.5-1.2]
	at com.hollingsworth.arsnouveau.api.spell.SpellResolver.resolveEffects(SpellResolver.java:148) ~[ars_nouveau:1.23.4]
	at com.hollingsworth.arsnouveau.api.spell.SpellResolver.onResolveEffect(SpellResolver.java:132) ~[ars_nouveau:1.23.4]
	at com.hollingsworth.arsnouveau.common.entity.EntityProjectileSpell.func_70227_a(EntityProjectileSpell.java:216) ~[ars_nouveau:1.23.4]
	at com.hollingsworth.arsnouveau.common.entity.EntityProjectileSpell.func_70071_h_(EntityProjectileSpell.java:108) ~[ars_nouveau:1.23.4]
	at net.minecraft.world.server.ServerWorld.func_217479_a(ServerWorld.java:611) ~[?:?]
	at net.minecraft.world.World.func_217390_a(MixinWorldRedstone.java:554) ~[?:?]
	at net.minecraft.world.server.ServerWorld.func_72835_b(ServerWorld.java:404) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:851) ~[?:?]
	... 5 more
commented

That's not something I expected to see!

Thanks for letting me know! As soon as my PC is fixed I'll get on to testing that out and getting a fix for it!

commented

Also happens with shulker bullets btw. Turns out less things inherit from LivingEntity than you might think. :\

commented

Yeah, I think I was assuming that the LivingEntity checks throughout the spell resolver process was gonna catch it, but it didn't, I know the fix I just need to rescue my data from my now-dead PC

commented

No rush, no rush. Your data's more important and this isn't really game breaking.