Jump to content

NoSuchFieldError on generated mods file with runServer


arungupta

Recommended Posts

Here are my system details:

Minecraft Version: 1.19
Minecraft Version ID: 1.19
Operating System: Mac OS X (aarch64) version 12.5.1
Java Version: 17.0.4, Eclipse Adoptium
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Eclipse Adoptium

I created a few mods and they all seem to run fine from Eclipse using runClient. But when a mod file is generated using "gradlew build" command, and placed it in "run/mods" directory, then the server started with "gradlew runServer" crashes with an exception, The complete log is at https://gist.github.com/arun-gupta/48f0c2a882347ca952a3195c6ad57568.

I removed SkeletonWars mod from the mods file included in run/mods directory and now a similar error occurs in ExampleMod. Complete log for that is at https://gist.github.com/arun-gupta/7c80c37869b231c952831b66f081579c.

Any ideas?

Link to comment
Share on other sites

You can't put the obfuscated jar of a mod in the run/mods folder. The development environment is a deobfuscated environment.

The way to include other mods is via dependencies with fg.deobf to deobfuscate them.

Examples from the mdk: https://github.com/MinecraftForge/MinecraftForge/blob/b5d585555964b6149707514454ec3202a69cb66f/mdk/build.gradle#L134

the comments also have links to the relevant gradle docs.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

This is very helpful. The "run/mods" directory has "modid-1.0.jar" I tried the commands

implementation fg.deobf("blank:examplemod:1.0")

and

implementation fg.deobf("blank:examplemod:1.0")

But both does not seem to be working. Seems like the dependencies are not correctly specified. Any further suggestions?

Link to comment
Share on other sites

Quote

The "run/mods" directory has "modid-1.0.jar"

It should not be there, re-read what I wrote above.

 

For your new configuration: https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver

There is also an example in the same mdk file I posted before: 

https://github.com/MinecraftForge/MinecraftForge/blob/b5d585555964b6149707514454ec3202a69cb66f/mdk/build.gradle#L122

Edited by warjort

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.