Started by
TheArchVillager
on
Topic category: Troubleshooting, bugs, and solutions
When I press "Regenerate Code", I see the gradle icons loading. Then the error pops up again. How do I fix that?
Topic category: Troubleshooting, bugs, and solutions
When I press "Regenerate Code", I see the gradle icons loading. Then the error pops up again. How do I fix that?
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
Reinstalling the version does not work.
Your trade mod element is referencing item that no longer exists in your workspace
I know, but how do I fix it? It's deleted after all.
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
How do I do that then? Is there a button to do that?
In what file are deleted elements kept?
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.
It still doesn't work. No items reference unexisting ones.
I can't even migrate the mod due to the errors. When I press "ignore error", no mod element is marked