Spectator mode Custom Container Block Minecraft Crash

Status
Works as designed
Type
Product/platform
MCreator/Windows
Priority
Normal
Issue description

Another interesting Bug appeared!

This time, Minecraft crashes.

I'm going to explain this with pictures again...

 

Step one, create a Block (with container), a GUI (with some input slots, in my case there are two) and a Procedure (to open the GUI):

1

 

The Block with Inventory selected (Everything else is not edited):

2

 

The GUI is bound to the Block:

3

 

The GUI can have a few input slots (I created 2 random placed slots):

4

 

And finally the Procedure for opening the GUI:

5

 

Now run the Mod in the client environment and as you can see you can open the container GUI:

6

 

Now switch into Spectator mode:

7

 

And open the container Block, as you can see nothing happens, minecraft does not crash:

8

 

Back to MCreator... Now change the Size of the inventory to something smaller than 9 (I changed it to 8):

9

 

Back in Minecraft... After you click on the Block, Minecraft chrashes: 

10

 

I attached this workspace down below, so you don't have to create the mod elements.

Attachment Size
The Workspace464.93 KB 464.93 KB

Issue comments

The issue here is that you set the inventory to the size of 9 slots and create a new world. As you open a GUI, inventory contents for 9 slots are stored in the world. As you then decrease and open Minecraft back, 9 slots are stored in the world save, but there are not 9 slots to be filled. You are not supposed to change the size of the inventory once you set it to a certain value.



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.