[HELP] Custom Crafting Table GUI Opens and Closes Immediately - NeoForge 1.21.4

Started by Sanya Lamhfveathoff on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[HELP] Custom Crafting Table GUI Opens and Closes Immediately - NeoForge 1.21.4

MCreator Version: Latest
Forge/NeoForge Version: NeoForge 1.21.4 (21.4.137)
Minecraft Version: 1.21.4

 

I'm trying to create a custom crafting table block that opens a crafting GUI with a custom name ("Temporary Crafting Table"). The block is created using custom code in MCreator. However, the GUI opens for just a split second and then immediately closes.

 

I've implemented the block using custom Java code, replacing the default MCreator-generated code entirely. Here's my current implementation:

TemporaryCraftingTable

 

Then the server logs show that everything works correctly on the server side:

[Server thread/INFO] [Erflettmod/]: Opening crafting menu for player: Dev

[Server thread/INFO] [Erflettmod/]: Menu opened successfully

However, the GUI still closes immediately on the client side.

 

What I've tested:

  1. Vanilla crafting table works perfectly: the issue is specific to custom blocks
  2. Tried different approaches:
    1. Using getMenuProvider() override
    2. Extending CraftingTableBlock directly
    3. Adding delays with level.getServer().execute()
    4. Different InteractionResult return values
  3. No other procedures or triggers are set in MCreator for this block
  4. Disabled all MCreator-generated code and replaced with custom implementation

 

Setup of this block: 

  • Created block element in MCreator
  • Disabled procedures and block entities
  • Opened the Java file and replaced all content with custom code
  • No "When right clicked" procedures set
  • No GUI elements configured in MCreator UI

 

I have four questions:

  1. Is this a known issue with MCreator + NeoForge 1.21.4?
  2. Should I use MCreator's GUI system instead of custom CraftingMenu?
  3. Are there any specific MCreator settings that might interfere with custom GUI code?
  4. Is there a client-server synchronization issue I'm missing?

Any help or suggestions would be greatly appreciated! The server-side logic works perfectly, but something prevents the client from keeping the GUI open.