IntellectualSites / plothider

Hide your creations! Is it invisible, or just a massive hole?

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Claim a plot with player A
  2. Hide it from player B
  3. Run /p set main ##*logs to create a lot of block states in the plot
  4. (Re)-join with player B
  5. 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

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)