This wiki page needs updating! It was written for older versions of MCreator that are not supported anymore. The interface or procedures might have changed so this page needs to be updated. If you would like to help updating wiki, apply for the wiki contributor.
This is the very first look when you open up the MCreator's code editor.
- 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.
- File operations:
- New class - creates a new class (.java file).
- New package - creates a new package ("folder").
- Delete - deletes file or package.
- Workspace overview (tree structure):
- Decompiled Minecraft source code classes
- Decompiled Minecraft Forge source code classes
- Mod packages
- mcmod.info file - mod describer file
- 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.
- 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.
- One of the mods classes (Block.java is the currently open mod, adding a simple block)
- Source code - the tabs above list the currently open mod files. The selected one is highlighted.
- Code outline