every single element of workspace can't compile anymore

Started by TDO on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 14:55, 2. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
every single element of workspace can't compile anymore

Im making a mod. i was working on it when suddenly it told me something was wrong and that i needed to regenerate code.

Now every time i try to regenerate code, build keeps failing because of compiling.

When i look at the console, i can see that EVERY SINGLE ONE of my workspace elements fails compiling. and every time i do regenerate code, it does nothing.

Heres the error message :

> Task :compileJava
C:\Users\onyxl\MCreatorWorkspaces\tdosmod\src\main\java\net\mcreator\tdosmod\client\model\Modelsamuraiarmor.java:6: error: cannot find symbol public class Modelsamuraiarmor<T extends Entity> extends EntityModel<T> {
^

This goes on for each one of my workspace elements.

then, 

Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
100 errors
only showing the first 100 errors, of 1282 total; use -Xmaxerrs if you would like to see more
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 10s
1 actionable task: 1 executed

BUILD FAILED
Task completed in 34 seconds

This is the worst issue i ever had in mcreator, and nothing seems to fix it.

Last seen on 14:24, 2. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
...This is probably a dumb…
Tue, 01/30/2024 - 00:00

...This is probably a dumb question, but have you tried clearing your gradle caches? Unless all of your elements are dependent on one thing that you accidentally deleted or changed, this looks like the cache just got corrupted. If you haven't tried this, you can do so by going to the build & run menu, and either reload the gradle cache, (which will reset the caches, and usually fixes this sort of thing), or you can clear all gradle caches, (which will take longer, but is usually a lot more thorough.) Hope this helps!

Last seen on 14:55, 2. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@Mindthemoods yes i did, it…
Sun, 02/25/2024 - 23:33

@Mindthemoods yes i did, it did nothing  i had to start off from zero again

Last seen on 14:24, 2. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You might not have to start…
Sun, 02/25/2024 - 23:36

You might not have to start totally from zero. I had a pretty large workspace get badly corrupted once. If you still have functional backups of the workspace, you can create a new workspace, and import the backups under a different workspace name. (Keeping the original mod id, if you still want it to be compatible with clients running an older version of your mod.) That way you only have to recreate the stuff from after the last time you backed up the workspace. 

You can also lock mod elements and copy-paste code from the broken workspace to rebuild elements more quickly. This is a bit trickier, but might be worth looking into if you have a lot of stuff you need to recreate.