Arkyo Posted August 21, 2017 Posted August 21, 2017 the "mcversion": "" Only accepts one minecraft version, which I want my project to be able to run in multiple versions Quote
jabelar Posted August 21, 2017 Posted August 21, 2017 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. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
Insane96MCP Posted September 16, 2017 Posted September 16, 2017 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? Quote
Choonster Posted September 16, 2017 Posted September 16, 2017 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. Quote 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.
Insane96MCP Posted September 18, 2017 Posted September 18, 2017 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 Quote
Recommended Posts
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.