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.

  1. 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.

  2. Click the green plus button

    Inside your workspace, look for the green plus button to add a new mod element to your project.

  3. Choose the Custom element

    In the element selection list, look under the Logic & code group.

    Click on Custom element to select it.

  4. 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.

  5. 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.

  6. 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.

  7. 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

Try it in the Studio All custom element fields explained →