Topic category: Help with MCreator software
I have been working diligently on a magic mod. But randomly, it stopped generating the client and started saying, "one or more of your main mod files did not compile properly". I did not change anything as this occurred on first boot up. In the console it gives the following error:
C:\Users\der\MCreatorWorkspaces\caster\src\main\java\net\mcreator\caster\init\CasterModTabs.java:94: error: package CasterModItems does not exist
tabData.accept(CasterModItems.TOMEOF_HEALING.get());
It then repeats this error several dozen times over different objects in my mod. I am using a plugin but turning off the API has not solved the issue. I have also tried some of the solutions here: https://mcreator.net/tracker/issue/53335. I would like assistance with this dilemma as I have spend many hours perfecting this mod, (nearly finishing it) and it would be a terrible shame to loose it.
Please help.
I managed to fix some of the errors by removing the creative mode tabs but 3 errors remain:
C:\Users\der\MCreatorWorkspaces\caster\src\main\java\net\mcreator\caster\CasterMod.java:41: error: cannot find symbol CasterModItems.register(modEventBus);
^
symbol: variable CasterModItems
location: class CasterMod
C:\Users\der\MCreatorWorkspaces\caster\src\main\java\net\mcreator\caster\CasterMod.java:43: error: package CasterModTabs does not exist CasterModTabs.REGISTRY.register(modEventBus);
^
C:\Users\der\MCreatorWorkspaces\caster\src\main\java\net\mcreator\caster\entity\TrueHerobrineEntity.java:79: error: package CasterModItems does not exist this.spawnAtLocation(new ItemStack(CasterModItems.ELDRITCH_EYE.get()));
For additional information, I am using MCreator version 2024.1 and the mod is using NeoForge.
This usually happens due to plugins installed having a bug
Uninstalling both the plugin and the API did not solve my problem. And even if it did, the plugin is vital for the mod to function. What else could I do?
In an attempt to isolate my problem I deleted all assets in my mod, and tried to start the client (it did start). I wasn't entirely an idiot as I did copy the workspace twice so that I could back it up. How might one put a copy of a workspace back into mcreator? When I move the workspace folder into the mcreator folder, it does not notice the folder and does not let me boot up the workspace. I believe I may have of just made my situation worse. Please, I need help, this mod is like my child, it is by far the best I have made in the several years I have been doing mcreator.
when you open MCreator below "new workspace" click on "open workspace" then select the workspace folder, and the .mcreator file inside of it
Thank you, this did fix that problem, however, I am still having the issues as mentioned before. Errors such as this:
C:\Users\der\Desktop\caster - Copy\src\main\java\net\mcreator\caster\init\CasterModTabs.java:54: error: package CasterModItems does not exist tabData.accept(CasterModItems.TOMEOF_LIGHT_BEAM.get());
More errors exist now than did before and many are in the above format.
I don't know how to help with that, I had a similiar problem once but I couldn't find a way to fix it so I just lost the entire workspace (but I had an old backup so after adding back some stuff I saved my mod), I hope someone else will help
From now on I will make VERY constant backups of any mod I make, I just hope someone has a solution to this problem.
I suppose that at this point I should simply abandon this mod. It is a shame, and my love for Mcreator has diminished somewhat. But, I guess I learned to not make the mistake of doing literally nothing again (I still have no idea why it broke in the first place).
Further information: After more fidgeting with the mod I discovered something interesting: If I remove every item in the mod, it will run. If I add a new item with a new texture it still won't, will this narrow the problem down?
I have narrowed it down to one error, for one item:
C:\Users\der\Desktop\Caster Repair Attemps\caster-1\src\main\java\net\mcreator\caster\CasterMod.java:41: error: cannot find symbol CasterModItems.register(modEventBus);
If this error can be solved, the entire issue can be solved as I can apply it to other items.
I have solved the problem. First, go to build and run and click on "run gradle task". Run the task, "clean". This will remove most errors. Any remaining errors you remove by manually reloading each item in your mod by opening it and saving it. Then, if any error persists, make a backup of the workspace and delete each item until the error is removed. Open up the backup, remove the troublesome item, and then it should work. At least that's how I fixed my problem.