Skip to content

Commit 33c1b20

Browse files
committed
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.
1 parent 67e6423 commit 33c1b20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DynmapCore/src/main/java/org/dynmap/common/chunk/GenericMapChunkCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,8 @@ public GenericMapChunkCache(GenericChunkCache c) {
618618

619619
public void setChunks(DynmapWorld dw, List<DynmapChunk> chunks) {
620620
this.dw = dw;
621-
nsect = (dw.worldheight - dw.minY) >> 4;
622-
sectoff = (-dw.minY) >> 4;
621+
nsect = (int)Math.ceil((dw.worldheight - dw.minY) / 16.0);
622+
sectoff = (int)(Math.ceil((-dw.minY) / 16.0));
623623
this.chunks = chunks;
624624

625625
/* Compute range */

0 commit comments

Comments
 (0)