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

paper remap has bug #11529

Closed Neige7 closed 1 week ago

Neige7 commented 1 week ago

Expected behavior

before paper remap: Image

Observed/Actual behavior

after paper remap: Image Image

Steps/models to reproduce

((CraftWorld) world).getHandle().getChunkSource().chunkMap

.chunkMap will be destroyed by paper

Plugin and Datapack List

plugins [23:17:07 INFO]: Server Plugins (1): [23:17:07 INFO]: Bukkit Plugins: [23:17:07 INFO]: - NeigeItems

Paper version

1.21.1-128

Other

No response

electronicboy commented 1 week ago

From my understanding this is an issue with the mappings caused by spigots names conflicting with mojangs names in a weird manner

Neige7 commented 1 week ago

From my understanding this is an issue with the mappings caused by spigots names conflicting with mojangs names in a weird manner

obviously, but i don't know how to fix it, so i open a issue, instead of pr

lynxplay commented 1 week ago

I am confused how you are running into this bug tho? This is a known issue when remapping reflective calls, but your "pre remapped" jar is mojang mapped? Specify that your plugin is mojang mapped and just skip the remapper instead.

Neige7 commented 1 week ago

I am confused how you are running into this bug tho? This is a known issue when remapping reflective calls, but your "pre remapped" jar is mojang mapped? Specify that your plugin is mojang mapped and just skip the remapper instead.

I use paperweight

lynxplay commented 1 week ago

See https://docs.papermc.io/paper/dev/userdev#compiling-to-mojang-mappings

Neige7 commented 1 week ago

See https://docs.papermc.io/paper/dev/userdev#compiling-to-mojang-mappings

I already configure like that

lynxplay commented 1 week ago

If you are, the jar would not be remapped. Seems more like you are not using paperweight correctly.

Neige7 commented 1 week ago

If you are, the jar would not be remapped. Seems more like you are not using paperweight correctly.

because I haven't use "dependsOn(tasks.reobfJar)"

lynxplay commented 1 week ago

Is that repository public? If those paperweight usages are in a submodule you need to also respect their manifest files when shading them in. I'll close this issue as this is just a configuration issue given the remapper would not even remap your jar if you correctly marked it. The deeper issue of our mapping logic getting tripped up when spigot and mojang mappings collide is known, but only applies to reflective access.

If you need more help with configuring your project to correctly define the mojang namespace in the manifest file, check by our discord.

Neige7 commented 1 week ago

Is that repository public? If those paperweight usages are in a submodule you need to also respect their manifest files when shading them in. I'll close this issue as this is just a configuration issue given the remapper would not even remap your jar if you correctly marked it. The deeper issue of our mapping logic getting tripped up when spigot and mojang mappings collide is known, but only applies to reflective access.

If you need more help with configuring your project to correctly define the mojang namespace in the manifest file, check by our discord.

Yes, this repository is public: https://github.com/ankhorg/NeigeItems-Kotlin The submodule ":hooker:nms:v1_21+" uses paperweight. I resolved this issue in a somewhat unconventional way.