How to Make a Custom Element in Minecraft (Mod Maker guide)
Learn how to add your own custom code directly into your project using the browser-based 9Minecraft Mod Maker studio. No installation is required to get started.
Open the Studio and a workspace
Open your web browser and go to the 9Minecraft Mod Maker studio. Because it runs right in your browser, you do not need to install anything.
Open an existing workspace or create a new one. Make sure your workspace is set to one of the supported versions: NeoForge 26.1.2 or NeoForge 1.21.1.
Click the green plus button
Inside your workspace, look for the green plus button to add a new mod element to your project.
Choose the Custom element
In the element selection list, look under the Logic & code group.
Click on Custom element to select it.
Understand the Custom element
Unlike regular elements that have preset form fields to fill out, a Custom element is defined using custom code in code editor.
This lets you write your own instructions from scratch inside the studio.
Write your code in the code editor
When the code editor opens in your browser, you can start typing your custom code to define how your element works.
Save your changes inside the code editor when you finish writing your code.
Test with Build & run
Once your custom code is saved, click the Build & run button in the studio.
This compiles your project so you can test your new Custom element and make sure your code works as expected.
Export your finished mod
When everything works properly in your test, use the export option in the studio to save your completed mod file.
Tips
- Always verify that your workspace is using NeoForge 26.1.2 or NeoForge 1.21.1, as these are the supported versions for a Custom element.
- Since a Custom element is defined using custom code in code editor, double-check your code for any typing mistakes before clicking Build & run.
- Look under the Logic & code group whenever you want to add another Custom element to your workspace.