[Fixed] Compilation failure

Started by EMC on

Topic category: Help with MCreator software

Last seen on 14:26, 16. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Fixed] Compilation failure
Mon, 07/22/2024 - 23:20 (edited)

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.

 

Edited by EMC on Mon, 07/22/2024 - 23:20
Last seen on 14:26, 16. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I managed to fix some of the…
Sun, 07/21/2024 - 00:21

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.

Last seen on 14:26, 16. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Uninstalling both the plugin…
Sun, 07/21/2024 - 12:48

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?

Last seen on 14:26, 16. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In an attempt to isolate my…
Sun, 07/21/2024 - 14:13

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.

Last seen on 11:33, 7. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
when you open MCreator below…
Sun, 07/21/2024 - 14:34

when you open MCreator below "new workspace" click on "open workspace" then select the workspace folder, and the .mcreator file inside of it

Last seen on 14:26, 16. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you, this did fix that…
Sun, 07/21/2024 - 15:45

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.

Last seen on 11:33, 7. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know how to help…
Sun, 07/21/2024 - 15:52

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

Last seen on 14:26, 16. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
From now on I will make VERY…
Sun, 07/21/2024 - 17:20

From now on I will make VERY constant backups of any mod I make, I just hope someone has a solution to this problem.

Last seen on 14:26, 16. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I suppose that at this point…
Sun, 07/21/2024 - 22:20

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).

Last seen on 14:26, 16. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Further information: After…
Sun, 07/21/2024 - 22:56

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?

Last seen on 14:26, 16. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have narrowed it down to…
Sun, 07/21/2024 - 23:10

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.

Last seen on 14:26, 16. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have solved the problem…
Mon, 07/22/2024 - 13:24

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.