When importing a .mcr file, MCreator deletes the class files of all locked elements and custom classes

Upvotes: 0
Issue description

Pretty much what the title says. The attached workspace was exported in 1.8.3, and features a locked element and a custom class. When it's imported in 1.9.0, the .java file of the custom class and the locked element just disappear. MCreator prompts to regenerate the code, but it does nothing.

Attachment Size
Example workspace made in 1.8.3 with a locked element and a custom class12.79 KB 12.79 KB
bug_2.png140.19 KB 140.19 KB

Issue comments

MCreator 1.9.0 changes so many things in code that restoring locked mod element files does not make much sense. I suggest you to unlock them, reapply changes and lock them back.

From 1.9.0 on, any custom file in default MCreator package which is net.mcreator.<modid> (previously mod.mcreator) will be removed on build as default MCreator package is reserved for generated files and locked mod elements. Any other class files should be in their own packages (for example net.mcreator.<modid>.custom).

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.