Wouldn’t it be possible to make mods compatible across versions? Like 1.7.2 mods work in 1.7.10 or maybe even 1.6.4 mods work in 1.7.10. Maybe it is possible to use some sort of wrapper, like SpecialSource (how md_5 used the mappings to make NMS into MCP source into Minecraft source.) Couldn’t it be possible to do the same thing (since there is pretty much no reflection involved with Minecraft Forge) we could take fields that were modified in each version, and when the method or class is called, they could replace it with the valid class name? It would be awesome if this was put in Sponge.
I’m not just talking about sponge, I am talking about all mods. Say you take a 1.6.4 ddivinerpg mod, and you want to make it work In 1.7.10. I was wondering if this kind of thing was possible. I know sponge will work for multiple versions, but just mods in general.
I know that, what I am asking if it is possible if there is some kind of SpecialSource wrapper that md_5 has or something that could map the old code of forge into the new code… Thanks
It’s not a simple mapping issue because MCP already fixes that problem.
It’s the entire structure of the code changing. For example, if you depended on block ID numbers and data values, and then it changes completely so now you work with strings and there aren’t even data values anymore, no basic mapper can fix that.
However, you still can’t predict what will break. For example, you can consider a mod minor if all it does is print a message when a grass block is right clicked, but it would still be subject to breakage if the block API changed.
Whether a change is minor varies too. Java is fairly strict. Making a method in Java accept a generic collection rather than a specific type of collection would break code, even when such a change in, say, Python, would not.