Started by
TheTrueNotAppr…
on
Topic category: Help with modding (Java Edition)
yeah so I'm creating a java mod called minecraft plus and I'm tryna make emerald materials and it keeps saying that there are mod elements that won't compile properly.
How do I fix this???
Images, or the crash report, would be helpful; but in most cases, it's probably just a corrupted gradle cache. MCreator uses caches to load in stuff quicker, but sometimes they get corrupted and cause inexplicable problems. Try reloading the caches, (You can do this using the 'build & run' options, or manually, following the troubleshooting instructuins in MCreator's knowledge base), and see if that fixes things. If not, there may actually be something broken.
but what would be broken?
There are lots of things that can cause compilation errors; a compilation error just means that somewhere you've got code that isn't written correctly. MCreator is usually pretty good at fixing this sort of thing, but there are still a couple cases where it can occur:
If any of these are the case, you should be able to click the red links to determine which elements are actually causing the issue, and fix them manually. In most cases, this is as simple as just opening and saving the elements, which will automatically attempt to get rid of any missing parts. You can also try regenerating the code, which does this automatically.
However, if you're still getting compilation errors, it may mean your gradle cache has become corrupted. MCreator uses this to more quickly load in workspaces by making local saves of stuff, which sometimes get messed up and prevent the mod from compiling. If this is the case, you need to reload your gradle project, which will reset all the caches. You can do this from the 'build and run' menu. It takes a couple minutes, but it's a good thing to try if you're getting weird errors out of nowhere.