Crash on wither spawn

Players on my server have noticed that every time they try to spawn a wither boss the server crashes. After checking over the reports it seems like sponge may be the cause…

We are using spongeforge 2274 for 1.10.2. I don’t recall having this issue in earlier versions of sponge.

ps: Not sure what y’all are “fixing” or “changing” but it seems to be breaking many things…

The error in that crash is with a NuclearCraft TileEntity, it’s a multiblock that is doing a recursive NBT check that is breaking

NuclearCraft Dev here - there have now been a couple of reports of crashes when Sponge and NC are run together. I don’t know anything about sponge, and so don’t know what needs to be changed on my end to fix this issue. Could you perhaps be a little more specific?

1 Like

@Tom_Dodd This line here:

getTileData() is supposed to be used to attach additional data onto tile entities. It’s often used to add data to vanilla entities or modded entities (where you can’t just create an override of read/write NBT).

By writing the entire data structure in this tag it causes a recursion with sponge because sponge writes its data to the getTileData() tag (somewhat an anti-pattern possibly, but legal under forge).

There shouldn’t be any reason to override getTileData() since the forge implementation does all that’s needed

Just to mention what sponge does, here it intercepts the call to writeToNBT on the base TileEntity class:

It asks sponge’s data to be written to getSpongeData() (which retrieves the getTileData() tag).
Of course this could be changed to write to the compound argument directly (by fetching the ForgeData tag) but this is where the recursive call is coming from.

1 Like

Thank you very much for the thorough reply - still learning all the time :slight_smile:

1 Like