PaperMC / Paper

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

Optimized tick ready check (Paper 359) - Bug/Incompatibility #5108

Closed Spaex closed 3 years ago

Spaex commented 3 years ago

Hay,

What behaviour is expected:

The Chunkloader from WildLoaders has a "Time Left" Hologram over himself. It's expected to tick down every second. Worked fine before paper 359. grafik

What behaviour is observed:

After Paper's Tick ready check optimation in paper 359 it always shows Time Left: 1 day (the starting time) and doesn't tick down. The Developer of the plugin said that this is something with paper/spigot. If you build the paper repo and remove "Spigot-Server-Patches/0628-Optimized-tick-ready-check.patch" file it will work fine again without problems. Also this is not pure visual, the timer doesn't go down! grafik

Steps/models to reproduce:

Take any Paper Version after or including 359 and download WildLoaders---> The Time Left Holo won't work as it should. If you take older Paper versions it works just fine.

Plugins:

Wild-Loaders (https://github.com/OmerBenGera/WildLoaders)

Paper version:

[15:59:44 INFO]: This server is running Paper version git-Paper-443 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT) [15:59:44 INFO]: Checking version, please wait... [15:59:44 INFO]: Previous version: git-Paper-439 (MC: 1.16.5) [15:59:44 INFO]: You are running the latest version

Greetings Spaex

lukalt commented 3 years ago

I guess this is caused because the plugin creates a new tile entity which is registered in a different way than normal tile entities causing TileEntity.getCurrentChunk() to return null as the tile entity is never bound to a specific chunj. I'm not quite sure if this could be fixed in Paper without reverting the optimization. The easiest solution would be to use world.a(tileEntityChunkLoader) here https://github.com/OmerBenGera/WildLoaders/blob/master/v1_16_R3/src/main/java/com/bgsoftware/wildloaders/nms/NMSAdapter_v1_16_R3.java#L197

Spaex commented 3 years ago

I guess this is caused because the plugin creates a new tile entity which is registered in a different way than normal tile entities causing TileEntity.getCurrentChunk() to return null as the tile entity is never bound to a specific chunj. I'm not quite sure if this could be fixed in Paper without reverting the optimization. The easiest solution would be to use world.a(tileEntityChunkLoader) here https://github.com/OmerBenGera/WildLoaders/blob/master/v1_16_R3/src/main/java/com/bgsoftware/wildloaders/nms/NMSAdapter_v1_16_R3.java#L197

Thank you very much that solved the problem!:)

electronicboy commented 3 years ago

Closing, they've appeared to fix the issue, as well as NMS not being supported, there is very little interest in resolving the side-effects of plugins misregistering things in the world