wisp-forest / accessories

A extendable and data-driven Accessory Mod for Minecraft
Other
29 stars 12 forks source link

Fix null collection copy crash on holder cache lookup #145

Closed NerjalNosk closed 1 month ago

NerjalNosk commented 1 month ago

Simple fix of an issue that arises any time holder cached lookup is called over NBT-strict entities

NerjalNosk commented 1 month ago

Side note, this crash also occurs upon player death when killed by such mobs, but while the death is saved, the player death workflow is still interrupted, thus causing a complete loss of the dead player's inventory

Dragon-Seeker commented 1 month ago

Can you send any example crash for this issue as I am looking at this code and find no reason for the return value to be nulll

NerjalNosk commented 1 month ago

Had this occur while playing a tweaked version of The Solar Apocalypse, upon dying to a zombie spawned by the Underground Bunkers structure's spawners.

Dragon-Seeker commented 1 month ago

@NerjalNosk Can you get this to occur consistently?

NerjalNosk commented 1 month ago

It does occur any time one of these mobs kills me, although I do admit I yet have to try out with other mobs than the Underground Bunker zombies (especially since I'd like to get through this world without having to cheat)

Dragon-Seeker commented 1 month ago

I have pushed an update attempting to fix the issue better, hopefully removing the bug though I still do not quite understand how it occurs. Thank you for the PR and notifying me of the issue

NerjalNosk commented 1 month ago

Well, you definitely know your mod better than I do, I have no doubts you have a better understanding of why this is occurring. Thanks for providing a fix for it!