Game crashes when opening GUI with more then 6 slots.

Started by stefix1 on Sun, 12/05/2021 - 10:13

Topic category: Help with modding (Java Edition)

Last seen on 20:11, 13. Jan 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Game crashes when opening GUI with more then 6 slots.
Sun, 12/05/2021 - 10:13

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

 

 

Last seen on 20:11, 13. Jan 2022
Joined Nov 2021
Points:

User statistics:

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

nobody?

Last seen on 16:14, 12. Jan 2022
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.

Last seen on 20:11, 13. Jan 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 20:11, 13. Jan 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 02:58, 26. Jan 2022
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
also if that doesnt work try…
Thu, 12/09/2021 - 00:39

also if that doesnt work try the rebuild code option at the top right

Last seen on 20:11, 13. Jan 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.

Last seen on 21:38, 22. Dec 2021
Joined Oct 2021
Points:

User statistics:

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

when you make the block to open the GUI

Last seen on 16:14, 12. Jan 2022
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 20:11, 13. Jan 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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")

Last seen on 20:11, 13. Jan 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 03:29, 26. Jan 2022
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.