Occultism

Occultism

19M Downloads

Misplaced NBT Tags

Nerdpie opened this issue · 2 comments

commented

v1.16.6-1.16.0

Playing the Magical Mischief Tour pack, and I noticed that my bread wasn't stacking again. Looking at the NBT, I noticed that it had a sort direction and sort type added to it, at which point I realized that this was also why my storage remote was not saving the sort order. I had been using the keybind while keeping the remote in my inventory.

I don't know what the impact would be of trying to find the remote in the player's inventory, or if it could be cached from the keybind handler, but I would suggest that the code at least test whether the item chosen is a storage remote before returning it.

P.S. Sorry if I missed the template; I used the 'reference in new issue' option directly from the code.

commented

I'd say bread that thinks it's a storage remote is excellent magical mischief 🧙
Thanks for reporting - I'll add some sanity checks to that.

As for the underlying issue: Is it possible your inventory was sorted or the remote otherwise moved around while you had the remote open? (Just trying to figure out if the code to find the remote has a bug, or if it uses an outdated selected slot)

commented

I believe that I had not sorted my inventory while the remote was active, but I can test again after work.