Jump to content

Recommended Posts

Posted

I want to bring some general functions of my mods in one separate mod (create something like API). How I can do this? Every mod in forge is singleton, so, can I call required API methods from API. instance? If I can, and how I will know if mod named API was already initialized? It must be initialized before any dependent mod use it. Is there a way to set mod load order?

Posted

Take a look at Mod annotation (I think it's what you want).

example:

@Mod(modid = "moen-jaffas-power", name = "Jaffas - power", version = Reference.Version, dependencies = "required-after:moen-jaffas;required-after:moen-monnef-core")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class mod_jaffas_power {
...

 

EDIT:

there is also soft dependency - without the "required" part, e.g.:

@Mod(modid = Reference.ModId, name = Reference.ModName, version = Reference.Version, dependencies = "after:Forestry;after:BuildCraft|Energy;after:ExtrabiomesXL")

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

  • 6 months later...

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.