Jump to content

Recommended Posts

Posted

Hello!

So I am making 3 mods and there is a lot of repetitive code in between them. I decided that my best choice is to create a Library Mod (yes, in caps) to put all of the repeated code in and then just making my other mods off of that.

So if you want MyModA you need MyModA.jar and MyLib.jar.

The issue with this is that I don't know how to do that. Can anyone point me to a tutorial that explains how to do it. But like, every step (except setting up forge)?

Thanks!

 

BTW: Using 1.16.5-36.2.0

Posted

I would assume it is not so different from any other java/gradle project.

In the mods.toml add your main "library" mod as a dependency in your other two mods. Then simply import the library mod package into your two other mods and use whatever you want from it. Because the library mod is listed as a dependency in both your other mods, then you can be sure the user will have the library mod installed as well, because if they don't, Forge will notify them before the game is initialized.

Posted
  On 9/3/2021 at 7:28 PM, diesieben07 said:
Expand  

Yeah, I did that and it allowed me to play without the library. I want that if you want to play Actual Science you need the Actual Core.

This is my mods.toml:

  Reveal hidden contents

 

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.