Topic category: Help with Minecraft modding (Java Edition)
How to Add Custom Buttons to the Main Menu in Minecraft Using MCreator
If you want to add custom buttons to the Minecraft main menu (such as a link to a Discord server, or other external websites), this tutorial will guide you step-by-step on how to do it using MCreator.
Step 1: Make a new procedure
Step 2: Add global trigger "Mod loaded in the game"
Step 3: Go to Advanced and add the Custom Code snipped block
Step 4: Once your procedure looks like this, click Save mod element
Step 5: Select your procedure and click Edit code of selected mod element
Step 6: Remove the entire code and pase this code in:
https://pastebin.com/YPjuj42h
Step 7: Modify the code to your needs and press Ctrl + S, then press Lock the code for MCreator and save
Explanation: This is the code I've used on my main mod GeneratorCraft. I've actually had ChatGPT make this code for me and surprisingly it works absolutely fine!
Lines 21 and 22 determine the size of both of the buttons
Lines 30 and 35 determine the text of the buttons
Lines 31 and 36 determine the links these buttons will open
This is my first time making a tutorial for MCreator so I would love any and all feedback
Here's how the aftermath looks like