2020.2 generated corrupted code

Started by crispy_chips1234 on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
2020.2 generated corrupted code

log:

Executing Gradle task: build
Build info: MCreator 2020.2.14217, 1.14.4, 64-bit, 16384 MB, Mac OS X, JVM 1.8.0_232, JAVA_HOME: /Applications/MCreator.app/Contents/MacOS/jdk/Contents/Home/jre
> Configure project :
New Dep: net.minecraftforge:forge:1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3
> Task :compileJava FAILED
/Users/luke/Desktop/alloynew/src/main/java/potatocult/alloyreforged/world/dimension/VolcanicRuinsDimension.java:223: error: '{' expected    public static class Size /* failed to load code for net.minecraft.block.NetherPortalBlock */
                           ^
/Users/luke/Desktop/alloynew/src/main/java/potatocult/alloyreforged/world/dimension/VolcanicRuinsDimension.java:245: error: '{' expected    public static class PortalPosition /* failed to load code for net.minecraft.world.Teleporter */
                                     ^
/Users/luke/Desktop/alloynew/src/main/java/potatocult/alloyreforged/world/dimension/VolcanicRuinsDimension.java:298: error: illegal start of type    }
   ^
/Users/luke/Desktop/alloynew/src/main/java/potatocult/alloyreforged/world/dimension/VolcanicRuinsDimension.java:299: error: illegal start of expression          @SubscribeEvent
         ^
/Users/luke/Desktop/alloynew/src/main/java/potatocult/alloyreforged/world/dimension/VolcanicRuinsDimension.java:299: error: ';' expected          @SubscribeEvent
                        ^
/Users/luke/Desktop/alloynew/src/main/java/potatocult/alloyreforged/world/dimension/VolcanicRuinsDimension.java:390: error: illegal start of type }
^
/Users/luke/Desktop/alloynew/src/main/java/potatocult/alloyreforged/world/dimension/VolcanicRuinsDimension.java:390: error: ';' expected }
 ^
/Users/luke/Desktop/alloynew/src/main/java/potatocult/alloyreforged/world/dimension/VolcanicRuinsDimension.java:391: error: reached end of file while parsing }
 ^
/Users/luke/Desktop/alloynew/src/main/java/potatocult/alloyreforged/world/dimension/VolcanicRuinsDimension.java:392: error: reached end of file while parsing 9 errors
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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:c…
BUILD FAILED in 11s
1 actionable task: 1 executed
BUILD FAILED
Task completed in 34871 milliseconds

Workspace:

https://www.mediafire.com/file/u4r8680i0936yal/don%27t_steal.zip/file

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
UPDATE: I CHECKED EVERYTHING…
Mon, 04/13/2020 - 13:09

UPDATE: I CHECKED EVERYTHING IN THE knowledge base, as well of regenerating the code, changing the package name, duplicating the mod element... nothing worked.

I had the same problem…
Mon, 04/13/2020 - 15:02

I had the same problem yesterday. Reload the Gradle project and regenerate the code and builds. Do that until the workspace can be built. It can take a lot of times, but it works.

Last seen on 17:39, 15. Jan 2024
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can this affect mobs not…
Mon, 04/13/2020 - 22:21

Can this affect mobs not spawning naturally?

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
no, this just makes then…
Tue, 04/14/2020 - 00:20

no, this just makes then entire workspace broken

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
still waiting for the 48…
Tue, 04/14/2020 - 00:20

still waiting for the 48 hour cooldown till I can use the ticket tracker

Did you do this, exactly,…
Tue, 04/14/2020 - 07:27

Did you do this, exactly, step by step?

Delete the entire <your user home folder>/.mcreator/gradle folder, create a new workspace with the same generator version as the version of the workspace failing, after the setup of this new workspace is done, open your current workspace, and click Build & run -> Reload gradle project and then Build & run -> Regenerate code and build.

I don’t know, however, the…
Tue, 04/14/2020 - 08:00

I don’t know, however, the origins of this problem.

Gradle is clunky with its caches and they can get corrupt. Iregularry closing MCreator, Java tasks, Antivirus messing with Gradle files (especially this one) are known culprits of this.

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can't seem to find a …
Thu, 04/16/2020 - 11:19

I can't seem to find a .mcreator folder...

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hmm... did that and it did…
Sat, 04/18/2020 - 00:28

Hmm... did that and it did not work.

I checked the code and.....this

oof

Hmm, this is the only…
Sat, 04/18/2020 - 07:33

Hmm, this is the only solution I know and always worked so far. Did you do all the steps in the exact order?

Delete the entire <your user home folder>/.mcreator/gradle folder, create a new workspace with the same generator version as the version of the workspace failing, after the setup of this new workspace is done, open your current workspace, and click Build & run -> Reload gradle project and then Build & run -> Regenerate code and build.

If you have Antivirus, try disabling it too.

Reboot the computer before starting the procedure to be sure too.

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
still does not work, I even…
Sat, 04/18/2020 - 09:11

still does not work, I even tried creating other test dimensions and the Override annotation thingy was always missing.

Can you try to import the workspace?
Also in 1.12 this bug does not exist :/