MCreator's Code Editor

Works with

First look

When you open thye code of a file, you will see something like this. Now let see the usage of everything.

First look

1. A first thing you can now see is a new tab named "Code" between "File" and "Workspace". If you click on it, you will be able to see a few actions you can do. You can search and replace something in the code, save, load, and reformat the code. To execute these actions, you can use the shortcuts displayed at the right.

2. A second thing you can see on the page is the list at the right, showing all methods and sections in the file. You can use them to go directly to a part of the code, in clicking on a line.

3. The last thing you can have in the editor, is the list at the left of the picture. To see this list, you need to click on an arrow at the left of "WORKSPACE". This list shows you all files inside your workspace. The Source folder is the folder containing all packages and .java files of your mod. The Resources folder is the folder ontaining all asset and data files like textures, structures and JSON files. The Sounds, Structures and Models folders contain your custom sounds, structures and models, you have imported. Fianlly, you have your Minecraft folder, and the external librairies.

Locking mod files

Each time you will save the code in the code editor, you will have the following window. If you lock the code of the element, you won't be ale to use the editor. You will always be inside the code editor, until you unlock the code.

Locking the code

However, if you keep the code unlocked, the next tme you will save your mod element in the normal editor, your code will removed. So, you will have to re-write your code.

Tools of the code editor

In this section, we'll go over the tools you can use with shortcut

  • Find (Crtl+ F) - opens up a search tool that searches through the code.
  • Replace (Crtl + R) - opens up a search tool that searches for the first string through the code and replaces it with the second one.
  • Undo (Crtl + Z) - undoes your last action.
  • Redo (Crtl +Y) - redoes your last undone action.
  • Reformat code only (Crtl + MAJ + W) -¬†fixes tabulators and organizes class imports.
  • Reformat code and imports (Crtl + W) - adds missing class imports and sorts them alphabetically.
  • Save (Crtl + S) - saves changes.
  • Save and build (Crtl + S, then Crtl + B) - saves changes and rebuilds the entire mod code.


Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.