"Regenerate code" not working, with no plugins. How do I fix that?

Started by TheArchVillager on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 14:40, 4. May 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
"Regenerate code" not working, with no plugins. How do I fix that?

When I press "Regenerate Code", I see the gradle icons loading. Then the error pops up again. How do I fix that?

Last seen on 14:40, 4. May 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here is what the console…
Sat, 10/21/2023 - 08:38

Here is what the console says:

 

Executing Gradle task: build
Build info: MCreator 2023.3.36712, forge-1.20.1, 64-bit, 16075 MB, Windows 11, JVM 17.0.7, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk, started on: 2023-10-21-10:38:10


BUILD FAILED
Task completed in 5 minutes and 12 seconds

> Task :compileJava FAILED
C:\Users\redacted\MCreatorWorkspaces\weaponfull_mod\src\main\java\net\mcreator\weaponfullmod\init\WeaponfullModModTrades.java:21: error: cannot find symbol .add(new BasicItemListing(new ItemStack(WeaponfullModModItems.SILVER_COIN.get(), 3), new ItemStack(WeaponfullModModItems.BRONZE_COIN.get(), 6), new ItemStack(WeaponfullModModItems.DELETED_MOD_ELEMENT.get()), 3, 5, 0f));
                                                                          ^
symbol: variable DELETED_MOD_ELEMENT
location: class WeaponfullModModItems
1 error
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 2s
1 actionable task: 1 executed

BUILD FAILED
Task completed in 4 seconds

Last seen on 14:40, 4. May 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Reinstalling the version…
Sat, 10/21/2023 - 08:48

Reinstalling the version does not work.

Your trade mod element is…
Sat, 10/21/2023 - 12:27

Your trade mod element is referencing item that no longer exists in your workspace

Last seen on 14:40, 4. May 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know, but how do I fix it?…
Sat, 10/21/2023 - 14:03

I know, but how do I fix it? It's deleted after all.

Delete/unset the references…
Sun, 10/22/2023 - 12:05

Delete/unset the references that are still present.

Some other element is referencing the element you deleted and this will of course cause build errors

Last seen on 14:40, 4. May 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I do that  then? Is…
Sat, 10/28/2023 - 06:06

How do I do that  then? Is there a button to do that?

Last seen on 14:40, 4. May 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In what file are deleted…
Sat, 10/28/2023 - 06:24

In what file are deleted elements kept?

Once you delete them, they…
Sat, 10/28/2023 - 09:51

Once you delete them, they are gone.

Let's reword this.

You have block BLOCK that drops item ABC and has item ABC selected for drop.

Now you delete ABC.

BLOCK still defines ABC as drop and it will fail to build.

You need to edit BLOCK and change its drop for it to build again.

 

 

Last seen on 14:40, 4. May 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It still doesn't work. No…
Sat, 11/04/2023 - 07:11

It still doesn't work. No items reference unexisting ones.

 

Last seen on 14:40, 4. May 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can't even migrate the mod…
Sat, 11/04/2023 - 07:15

I can't even migrate the mod due to the errors. When I press "ignore error", no mod element is marked