Jump to content

My mod doesn't work on my minecraft client but works on my eclipse workspace


Recommended Posts

Posted

SOO I am just opening this thread to discuss this.

I made a mod, and I just added an item. I run the runClient.launch file on eclipse.
And the mod works perfectly! The "MODS" tab on the minecraft menu registers the mod with all the info that I inputted on the mod.toml file.

I then wanted to try the mod on my actual Minecraft Client with my account.
To rebuild my mod into a jar file that can be usable by minecrafy I just did:
gradlew build
On my project folder.

The jar gets built successfully in the build/libs dir.

I move the jar file to my mods folder on my Minecraft Client, run the game.
I can see the mod registered on the "MODS" tab on the Minecraft Menu, just like in the eclipse run.

But once I boot a world I look for the object I added in the mod and it is nowhere to be found.

I already tried a lot of different things like remaking the mod, rebuilding the gradle project and more things, none of them have worked.

If someone know about this, can you help me out?

Thanks!

Posted

You have 3 classes and all of them have an @Mod annotation for the "breaking" mod.

e.g. https://github.com/Robatortas/BreakingBadMod/blob/db29fed424212e7fc238b629ae4b734b1bafe13c/src/main/java/io/github/robatortas/breaking/Registers.java#L17

You need to decide which of them is really your mod class.

 

This could be regarded as a bug.

It should really throw an error if it finds duplicates @Mod annotations for the same mod id instead of just picking one at "random".

  • Like 1

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.

Posted
On 9/9/2022 at 4:49 AM, warjort said:

You have 3 classes and all of them have an @Mod annotation for the "breaking" mod.

e.g. https://github.com/Robatortas/BreakingBadMod/blob/db29fed424212e7fc238b629ae4b734b1bafe13c/src/main/java/io/github/robatortas/breaking/Registers.java#L17

You need to decide which of them is really your mod class.

 

This could be regarded as a bug.

It should really throw an error if it finds duplicates @Mod annotations for the same mod id instead of just picking one at "random".

Thank you for your answer.
It worked.

And yes, this should throw an error in case this happens.

I appreciate the help!

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.

Announcements



×
×
  • Create New...

Important Information

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