Skip to content

[userdev] Generate multiple spigot mapping classes with same mojang mapping code. #249

@Rothes

Description

@Rothes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions