Topic category: Help with Minecraft modding (Java Edition)
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:
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:
- Vanilla crafting table works perfectly: the issue is specific to custom blocks
- Tried different approaches:
- Using
getMenuProvider()
override - Extending
CraftingTableBlock
directly - Adding delays with
level.getServer().execute()
- Different
InteractionResult
return values
- Using
- No other procedures or triggers are set in MCreator for this block
- 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:
- Is this a known issue with MCreator + NeoForge 1.21.4?
- Should I use MCreator's GUI system instead of custom CraftingMenu?
- Are there any specific MCreator settings that might interfere with custom GUI code?
- 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.