Simply Swords [Fabric & Forge]

Simply Swords [Fabric & Forge]

16M Downloads

Zoglin Wildfire crash

KingLem opened this issue ยท 4 comments

commented

java.lang.ClassCastException: class net.minecraft.world.entity.monster.Zoglin cannot be cast to class net.minecraft.world.entity.player.Player (net.minecraft.world.entity.monster.Zoglin and net.minecraft.world.entity.player.Player are in module [email protected] of loader 'TRANSFORMER' @342723a3)
at net.sweenus.simplyswords.effect.WildfireEffect.m_6742_(WildfireEffect.java:35) ~[simplyswords-forge-1.43.1-1.19.2.jar%23537!/:?] {re:classloading}

Looks like there's a weird interaction with whatever causes the WildfireEffect class to be used and Zoglins. Might need to put in a check for entities which can't be cast to Players.

This bug will crash whichever world it happens in and effectively corrupt it, since the code will immediately be executed upon reloading the world and crash the world again.

commented

I'm not quite sure how this issue could even occur, but I've added some failsafes to prevent this crash in the latest release for 1.19.2.

commented

Just had this happen in 1.19.3 (simplyswords-forge-1.43.1-1.19.3). Running hypothesis without looking at any of the code is that an NPC somehow acquired the Wildfire buff (either through picking up a weapon granting that buff or through Occultism's Blessing granting random buffs when hit) and that some part of the buff's code expects either the buffee or some other target to be a Player.

commented

Update: Looking at the git log, it looks like a fix for this (4e0f961...) was checked into the 1.19.3 branch in April but never shipped to CurseForge as a 1.19.3 package. : (

commented

Hi there, you're correct in that it was fixed but not pushed to 1.19.3. You would need to swap to 1.19.2 or 1.20 build versions. The 1.19.3 version was just to bridge the gap between Minecraft versions and is not actively maintained.