MCreator's Code Editor

Works with

First look

This is the very first look when you open up the MCreator's code editor.

  1. Search field: Searches through files while typing into the field.
    • Search in code - searches for the string inside all the files including their code.
    • Clear - clears the search field.
  2. File operations:
    • New class - creates a new class (.java file).
    • New package - creates a new package ("folder").
    • Delete - deletes file or package.
  3. Workspace overview (tree structure):
    • Decompiled Minecraft source code classes
    • Decompiled Minecraft Forge source code classes
    • Mod packages
    • file - mod describer file
  4. Keyboard shortcuts, to make work faster, easier and overall more efficient.

Locking mod files

When you open a mod in order to edit its source code, a window pops up, asking you whether you want to lock the file or not.

To lock the code means that you won't be able to edit your mod using the wizard, so when you open the mod will only open the code editor. Editing the code without locking means that every time you decide to edit mod using the wizard, your changes will disappear.

The code editor

In this section, we'll go over the components of the embedded code editor.

  1. Code tools:
    • Find - opens up a search tool that searches through the code.
    • Replace - opens up a search tool that searches for the first string through the code and replaces it with the second one.
    • Undo - undoes your last action.
    • Redo - redoes your last undone action.
    • Reformat the code - fixes tabulators and organizes class imports.
    • Fix and organize imports - adds missing class imports and sorts them alphabetically.
    • Save - saves changes.
    • Save and build - saves changes and rebuilds the entire mod code.
  2. One of the mods classes ( is the currently open mod, adding a simple block)
  3. Source code - the tabs above list the currently open mod files. The selected one is highlighted.
  4. Code outline