Displaying issues with too many block states
SirYwell opened this issue · comments
Server Implementation
Paper
Server Version
1.17.1
Describe the bug
When having a lot of block states in a plot, not all blocks are hidden. There is a repeating pattern (per chunk section) of blocks that aren't hidden. This only affects chunks that aren't fully covered by the plot.
To Reproduce
- Claim a plot with player A
- Hide it from player B
- Run
/p set main ##*logs
to create a lot of block states in the plot - (Re)-join with player B
- See weird patterns
Expected behaviour
All blocks are hidden properly
Screenshots / Videos
No response
Error log (if applicable)
none
Plot Debugpaste
https://athion.net/ISPaster/paste/view/5bab735845ea47fd9e31812d38c6d7cd
PlotHider Version
5.0.1 (based on but not caused by #33)
Checklist
- I have included a Plot debugpaste.
- I am using the newest build from https://www.spigotmc.org/resources/20701/ and the issue still persists.
Anything else?
I guess it has something to do with the global block palette being used instead of a custom one or by wrong calculation of the bits per entry (?).
The stacktraces in the debugpaste can be ignored, that's from attaching the IntelliJ debugger.
That produces a quite funky pattern, luckily it's only packets.
I've likely found the problem during the update process for 1.18+. Actually, it works on my 1.19 test server with the same tested conditions as yours.
To explain succinctly, we completely ignored a huge chunk format change introduced in 1.16 Minecraft update. Each long of the array representing block states is no longer entirely filled and padded with 0 if needed. (https://minecraft.fandom.com/wiki/Talk:Chunk_format#1.16_Chunk_format_changes)