Custom block with GUI seems to break the game

Started by DragonSlayr15001 on Mon, 11/30/2020 - 03:04

Topic category: Help with modding (Java Edition)

Last seen on 05:22, 3. Dec 2021
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Custom block with GUI seems to break the game
Mon, 11/30/2020 - 03:04

I'm making my first mod and I've made a block with a GUI, which looks like this, just in case it's important:

Cubic Folder GUI

 

 

 

I also have a procedure that runs when a player right-clicks the block bound to this GUI, which looks like this:

Battery Recipe Procedure

This simply searches the slots of the custom block for the right items for a recipe. Or at least, I think it does. I haven't been able to test it, or anything else that requires a GUI. You see, my problem is that if I load up my mod, in the client opened by MCreator or my own, once I am in a world, no GUIs open, and no commands run. Additionally, Minecraft will crash when saving the world, staying open until forcing it closed with either MCreator's stop button or KSysGuard. I have a feeling that either the block, the GUI or the procedure is causing this, but if you need to see anything more to help me solve this problem, I will gladly show it to you.

The local variable will not…
Mon, 11/30/2020 - 09:08

The local variable will not preserve through procedure runs.

For the crash, you are probably accessing slot with wrong ID, check https://mcreator.net/wiki/minecraft-crashes-when-i-open-my-gui

Last seen on 05:22, 3. Dec 2021
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I don't need the local…
Mon, 11/30/2020 - 22:23

I don't need the local variable to preserve through separate runs, I only put it there so the loop does something while waiting.

Additionally, this wiki page doesn't seem to address the same problem as I am facing. The game only crashes when saving and exiting the world. My biggest problem right now is that GUIs don't open. Not my custom one, not the crafting table, not the furnace, none.

Last seen on 05:22, 3. Dec 2021
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I'm honestly surprised this…
Sun, 01/24/2021 - 01:42

I'm honestly surprised this hasn't gotten any more responses, seeing as the issue hasn't been solved. Anyone else got any ideas?