Jump to content

How do you make your mod able to run in multiple versions in mcmod.info?


Recommended Posts

Posted

Generally you can't make a single mod support multiple versions because the codebase and Forge change with each version. For example, the way you register things in 1.12 is very different than in 1.7.10, newer versions use block states, recipes now use JSON, there are no longer Achievement but now there are Advancements, extended entity properties have been replaced with Capabilities and so for. Even for things that are functionally the same many of the important methods and fields have changed names in the SRG mappings. So it would be very difficult and unlikely to be able to make a mod that can be applied to many different versions.

 

Instead what you should do is port the code over to each version as separate project, build each one and then provide them to people to use together with the appropriate version.

 

In other words, to make it work with multiple versions you need to do a lot more than just change the mcversion value. You have to actually port your code and for complex mods each port to a new version can take weeks of effort.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

  • 4 weeks later...
Posted
On 21/8/2017 at 5:14 AM, jabelar said:

Generally you can't make a single mod support multiple versions because the codebase and Forge change with each version. For example, the way you register things in 1.12 is very different than in 1.7.10, newer versions use block states, recipes now use JSON, there are no longer Achievement but now there are Advancements, extended entity properties have been replaced with Capabilities and so for. Even for things that are functionally the same many of the important methods and fields have changed names in the SRG mappings. So it would be very difficult and unlikely to be able to make a mod that can be applied to many different versions.

 

Instead what you should do is port the code over to each version as separate project, build each one and then provide them to people to use together with the appropriate version.

 

In other words, to make it work with multiple versions you need to do a lot more than just change the mcversion value. You have to actually port your code and for complex mods each port to a new version can take weeks of effort.

And if I have a simple mod that was built in 1.11 and when ported in 1.12 workspace works without changing any code, is it possible to make it multiple version compatible?

Posted
1 hour ago, Insane96MCP said:

And if I have a simple mod that was built in 1.11 and when ported in 1.12 workspace works without changing any code, is it possible to make it multiple version compatible?

 

Set @Mod#acceptedMinecraftVersions to the range of Minecraft versions your mod can run on.

 

The version range format is documented in the doc comment of the VersionRange.createFromVersionSpec method.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
On 16/9/2017 at 0:43 PM, Choonster said:

 

Set @Mod#acceptedMinecraftVersions to the range of Minecraft versions your mod can run on.

 

The version range format is documented in the doc comment of the VersionRange.createFromVersionSpec method.

I've decided to keep 2 different and separated version so if I have to change something in the future that is not compatible with both versions I'm prepared

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.