Block with inventory crash when opened in spectator mode

Status
Fixed
Issue description

While trying to open a container block in spectator mode, the game crashes. It happens with all my mods.

It doesn't seem to crash with all the blocks though. The simplest ones (chest-like blocks) don't cause crash, but the most complex ones (custom brewing stands, red mana generators from Pyromancy..) do.

And not all the blocks that caused crash actually have a GUI.

Here is the crash log (crashed because of the Dark Brewing Stand from Hodge-Podge III):

https://pastebin.com/7qTGMEx5

Issue comments

I have found a hacky way to fix this in 1.9.1, but this is not a proper fix so I will keep this open until I fix this properly.

I suggest you check for gamemode and prevent GUIs from opening on spectator mode as a workaround for now.

This will be fixed in 2020.2 for version 1.14.4 completely and with a "no crashes" solution for 1.12.2.

No crashes, inventory will show the way it shows now. This solution:

I have found a hacky way to fix this in 1.9.1, but this is not a proper fix so I will keep this open until I fix this properly.