Open Alvinn8 opened 2 years ago
Hi!
I’ve implemented support for versions 1.14.4 -> 1.16.5 in my Maven plugin BNms-plugin.
Here are the challenges I had to address:
Reading the mappings:
csrg
mappings was relatively straightforward, but proGuard
mappings presented some difficulties. To convert them to csrg
, I had to build an inheritance map in both directions (from kid
to super
and vice versa).Reverting bukkit-1.16.5-cl.csrg
:
relocation
. However, I managed to solve it since the pattern was known for all non-NMS classes. For NMS classes, I simply read the mappings and created the corresponding map (AdvancementProgress -> net/minecraft/advancements/
).Applying Mojang mappings:
obf helper
. However, since I had already built the inheritance map while parsing proGuard
mappings, this made it easier to check for name conflicts.It’s also worth mentioning that until version 1.16, all NMS classes were located in a single package, which violated the encapsulation of package-private members. Restoring the original NMS structure leads to issues with running the server due to unauthorized access.
I would appreciate it if you could mention that there is a solution available for versions 1.16.5 and below.
On some older spigot versions, mappings use a package rename to avoid having to retype
net/minecraft/server
for every class mapping. Lorenz does not support package renames in srg mapping files (SrgReader.java#L134-L135) so we will need to copy the package over to all classes before reading the mappings. Or is there a better solution?