Canary/Sodium/Radium crashed/breaks Suspicious Pile of Pollen brushing (1.20.1)
Ladocterus opened this issue ยท 8 comments
Attempt to brush sus pollen crashed, not sure why.
crash-2023-11-08_16.25.11-server.txt
crash-2023-11-08_16.25.14-client.txt
Bad news, you have a mod on that is passing null as the heldItem into EntityCollisionContext. In minecraft, no one should ever be passing null for an itemstack. Always should be passing Itemstack.EMPTY. Infact, vanilla will crash too if someone calls vanilla's isHoldingItem method on EntityCollisionContext that was given null.
Do you have a link to the modpack that I can download to try and find who is passing in null dangerously
This is the vanilla code. It actually looks like someone set null in your hand which is even worse
I can add a check to stop the crash but it seems like you could still face issues with other mods as they won't be expecting null either.
Hum, I'll check and see if NotEnoughCrashes can pin point the problem causing mod.
if not I might need to do a binary search, cause this is a self assembled modpack.
You're not going to detect it with not enough crashes (and I don't even recommend that mod as trying to keep mc running after crashes can put game into unstable states)
Finding who sets hand item to null is extremely difficult and next to impossible to find sadly. Best I can do is a null check at this point. I'm not even sure your hand will be set it Itemstack.EMPTY properly after restarting game once it is set to null.
Found the problem, it was canary
https://www.curseforge.com/minecraft/mc-mods/canary
I will notify them too
just realized my workaround while it works to stop the crash, means the block is no longer brushable because canary (and Lithium) set the itemstack to null so I don't have the held item anymore. I'll try and workaround for their hacks to finally get the held item again so block is brushable