Exporting fails with custom packages

Published by Nuparu00 on Sat, 08/11/2018 - 19:14
Issue description

This issue is somehow quite similar to my last one about autocomplete in custom packages.
Now, my current issue is, that even though that the TestEnvironment runs perfectly, exporting always fails, because of references to other packages in classes that are from my package.
This includes both imports, accessing classes by the whole path, etc..

The console states "cannot find symbol" and points to the line, where the reference has been used. Removing the reference from the class, that the compiler stated just makes it find another case of this issue.


Attachment Size
packageCompileB.png137.18 KB 137.18 KB
packageCompileA.png134.49 KB 134.49 KB

Issue comments

This happens because MCreator only replaces TestEnvironmentMod text with the exported mod name for all files inside default MCreator's package. I will fix this, so the replace action is done recursively for all source folders.

In MCreator 2.x.x, this will be fixed as the package and mod name will be declared at the time of workspace creation as workspaces will be in own folders and there will be no limit of the number of them. This initial definition will resolve such issues once for all as there will be a constant mod name for the time of testing and exporting.

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.