Game crashes when opening GUI with more then 6 slots.

Started by stefix1 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Game crashes when opening GUI with more then 6 slots.

I don't know if this is the right category/section but anyway. I made a backpack item. It functions as intended. Then I added 10 slots, and it crashed. I have experienced this before, on older versions of mcreator. And no forum post seems to help me. 

Everything I checked was okay. 2 Errors (the first is from console, the bottom one is from crash reports):

https://pastebin.com/Lq9cZSU3

Also very random, but I cant put 2 models in mcreator because 1 of them wont appear lol

 

 

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nobody?
Tue, 12/07/2021 - 22:26

nobody?

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You have to add 11 if your…
Wed, 12/08/2021 - 13:29

You have to add 11 if your going to add 10. 

 

Its +1 every time.

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
wait no i forgot i added 9…
Wed, 12/08/2021 - 20:52

wait no i forgot i added 9 and put 10 in the size of inventory thing

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it crashes EVERY TIME i use…
Wed, 12/08/2021 - 20:53

it crashes EVERY TIME i use more then 6 slots. and im not sure why

Chewdog is right here, it is…
Thu, 12/09/2021 - 00:16

Chewdog is right here, it is because you need to add +1 to the amount of slots you plan to add. I usually make like 20 slots, just to be sure nothing will go wrong :P

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Guys I already know you put …
Fri, 12/10/2021 - 20:25

Guys I already know you put +1 to the amount of slots you add. Like if it was 10 I would add 1. And if I'm doing this wrong, where should I put the extra 1? I already put +1 in the item GUI options.

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
when you make the block to…
Sat, 12/11/2021 - 00:04

when you make the block to open the GUI

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Inside the block settings…
Sat, 12/11/2021 - 10:10

Inside the block settings you will see "tile entity" option at the bottom. This is where you add the +1. It says so in the fine print. This is the one place you will need the +1. Inside the block you made settings.

 

Chew

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
im using an item not a block
Sun, 12/12/2021 - 20:26

im using an item not a block

It also has this section, it…
Mon, 12/13/2021 - 17:19

It also has this section, it's under "advanced properties" > "inventory" section (it's called "size of inventory")

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sorry for late reply but yes…
Thu, 12/16/2021 - 21:59

sorry for late reply but yes that is where i put the number with an extra +1. And it crashed

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have the same issue as you…
Fri, 12/17/2021 - 00:57

I have the same issue as you. Gui worked perfectly until I updated to 2021.3 and now I can't even create new gui without the game crashing. And no it isn't a slot issue. i think this code is maybe causing the crash I'm not sure "Exception caught during firing event: Cannot invoke "net.minecraft.world.inventory.Slot.getItem()" because the return value of "java.util.Map.get(Object)" is null". But I am still able to open past gui I created before updating. Very frustrating as there seems to be no solution.

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried it on the latest…
Wed, 12/22/2021 - 09:34

I tried it on the latest version with latest mcreator version. First made backpack. Loaded the gui just fine with 6 slots. Added one aaaaaaaaand crash.