Fix nether roof renders on Spigot 1.21.3

DynmapWorld.worldheight is reporting as 255 in 1.21.3, instead of 256 like it did before. (Overworld is now 319 -> 320). Unsure if this is a bug, since it seems right ...

Either way, do a Math.ceil to ensure there's enough sections even when the amount of blocks doesn't evenly line up with a 16 block section.
This commit is contained in:
jacob1 2024-11-28 22:01:36 -05:00
parent 67e6423517
commit 33c1b20d3b
No known key found for this signature in database
GPG key ID: 4E58A32D510E1995

View file

@ -618,8 +618,8 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
public void setChunks(DynmapWorld dw, List<DynmapChunk> chunks) {
this.dw = dw;
nsect = (dw.worldheight - dw.minY) >> 4;
sectoff = (-dw.minY) >> 4;
nsect = (int)Math.ceil((dw.worldheight - dw.minY) / 16.0);
sectoff = (int)(Math.ceil((-dw.minY) / 16.0));
this.chunks = chunks;
/* Compute range */