Exporting fails with custom packages

Published by Nuparu00 on
Status
Fixed
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.

 

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.