Imagine a scenario:
You coded a class using NMS. You found that the code is consistent in mojang mappings from 1.19 to 1.20.2 (or more versions). But you are compiling the plugin to Spigot mappings.
For this, you need to create multiple modules and copy the java source file, and only specify the different minecraft version in build.gradle file, like what most plugins are doing now.
This would be a mess as you need to maintain it in different projects. With a simple change, you need to keep them in sync. This is cumbersome.
I'm thinking of if the plugin can generate classes in different minecraft versions automaticlly in a single project, this would help a lot in maintaining. This seems to work, applying a different mapping and adding a version ordinal to the end of the class name. Plugin can access them using reflect.
Imagine a scenario:
You coded a class using NMS. You found that the code is consistent in mojang mappings from 1.19 to 1.20.2 (or more versions). But you are compiling the plugin to Spigot mappings.
For this, you need to create multiple modules and copy the java source file, and only specify the different minecraft version in build.gradle file, like what most plugins are doing now.
This would be a mess as you need to maintain it in different projects. With a simple change, you need to keep them in sync. This is cumbersome.
I'm thinking of if the plugin can generate classes in different minecraft versions automaticlly in a single project, this would help a lot in maintaining. This seems to work, applying a different mapping and adding a version ordinal to the end of the class name. Plugin can access them using reflect.