The mod cannot be compiled

Published by centa on Sun, 04/12/2020 - 05:59
Status
Resolved
Type
Product/platform
MCreator/Windows
Priority
Normal
Issue description

I don't know why, but the mcreator cannot run my mod, nor any other that can be used for minecraft version 1.12.2

I explain:

If I save or create a new mod element, the construction will fail, it will not show an error window pointing to the element that is failing and it does not take long to show the error, as soon as the compilation of the mod fails, this error can only be seen in the console and there it shows the following

Executing Gradle task: build
Build info: MCreator 2020.2.14217, 1.12.2, 64-bit, 3918 MB, Windows 10, JVM 1.8.0_232, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk
This mapping 'snapshot_20171003' was designed for MC 1.12! Use at your own peril.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'iluminite_mod'.
> java.lang.NullPointerException (no error message)
* 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 16s
BUILD FAILED
Task completed in 16672 milliseconds

it takes more than 10 or 8 seconds only when compiling for the first time, after that it takes 1-4 seconds

I do not know why this is presented, but not only happens in a mod that is being developed, but it also occurs when creating a new workspace for minecraft 1.12.2, when trying to create it, the error comes out and as I can not find a solution the new workspace is not created.

I would like to know how I can solve it, I already tried to install windows updates or java requests, rebuild the code, install mcreator again, but nothing works, that does not happen for minecraft 1.14.4, only for 1.12.2, what can I do?

I'm sorry for the bad english

Issue comments

And by the way, I discovered it two days ago and I think I was the only one to whom this happened, I think I discovered it by chance and on my own hehe

In some cases, Gradle caches that make sure the build process does not take too long can get corrupted. In such a case, go to:

<your user home folder>/.mcreator/gradle

In this folder, there is a folder called caches. Delete this folder and open MCreator again. Next build will take a bit longer as caches need to be rebuilt.

If this is not enough to make things work, delete the entire gradle folder, not just caches and try again.

If even this fails, try to 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.

Finally resolved :)

thank you very much for your help :b

You are welcome! I am glad I could help :) If you like what we do, consider donating to us to help us keep this project up.



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.