Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

the 

"mcversion": ""

Only accepts one minecraft version, which I want my project to be able to run in multiple versions

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...
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?

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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.