Split 1.17 module into 1.17-common, 1.17, and 1.17.1 #304
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR takes the old commandapi-1.17 module and splits it into three modules: commandapi-1.17-common, commandapi-1.17, and commandapi-1.17.1.
This is necessary because the field MinecraftServer.resources (accessed in
reloadDataPacks()
) is mapped to two different names (aB and aC) for the two versions 1.17 and 1.17.1. This caused the following exception on a 1.17 Spigot Server:It seems that this is the only difference relevant to the CommandAPI between 1.17 and 1.17.1, though if other differences are found, these classes can definitely be expanded. To cut down redundant code, commandapi-1.17-common contains almost all the NMS methods except for
reloadDataPacks()
, which is implemented identically in commandapi-1.17 and commandapi-1.17.1, but mapped differently by specialsource.To allow commandapi-1.17 and commandapi-1.17.1 access commandapi-1.17-common both before and after it is remapped, they depend on both the mojang mapped and unmapped versions of Spigot 1.17.1-R0.1-SNAPSHOT.
I tried to match the code style and project layout, but I'm not sure if I got the annotations correct on the NMS classes. Feel free to change anything that's not quite right!