PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.97k stars 2.31k forks source link

Libraries loaded via paper/spigot library loader are not remapped #10476

Closed ItsRainingHP closed 6 months ago

ItsRainingHP commented 6 months ago

Expected behavior

Remapped libraries

Observed/Actual behavior

Libraries are not mapped when loaded through the Paper/Spigot Library Loader

Steps/models to reproduce

Use the spigot/paper library loader and remapping in manifest

Plugin and Datapack List

RDQ

https://github.com/NichtStudioCode/InvUI

Paper version

1.20.5

Other

No response

lynxplay commented 6 months ago

After the initial round of internal discussion, this is a tricky issue. Remapping every library is annoying given this is mostly used for thirdparty libraries unrelated to minecraft (think kotlin standard library, hikaricp or the likes).

Remapping all of these libraries and their dependencies is a huge waste of disk space and computing power.

This might end up with us having to put some work on the shoulders of said library developers to include a similar "opt-in" to being remapped in their manifest as paper-plugins would have to. Given paper guarantees 0 compatibility with spigot on an NMS level, most libraries messing with internals should have a paper module already, which they could now publish under mojang mappings. If not, the opt in to define the requirement for remapping should be easy enough to setup for plugins only targeting spigot.

Super open ended discussion tho, this topic is a bit more complex than just plugin remapping as for the above reason ^

lynxplay commented 6 months ago

For context, a library that is affected by this would be https://github.com/NichtStudioCode/InvUI (for future remapping tests)