Started by
stefix1
on
Topic category: Help with Minecraft modding (Java Edition)
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):
Also very random, but I cant put 2 models in mcreator because 1 of them wont appear lol
nobody?
You have to add 11 if your going to add 10.
Its +1 every time.
wait no i forgot i added 9 and put 10 in the size of inventory thing
it crashes EVERY TIME i use more then 6 slots. and im not sure why
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
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.
when you make the block to open the GUI
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
im using an item not a block
It also has this section, it's under "advanced properties" > "inventory" section (it's called "size of inventory")
sorry for late reply but yes that is where i put the number with an extra +1. And it crashed
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.
Did you try to use latest 2021.3? If not, report this as an issue on GitHub: https://github.com/MCreator/MCreator/issues
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.