Skip to content

Commit

Permalink
fix (#2536)
Browse files Browse the repository at this point in the history
  • Loading branch information
davight committed Sep 10, 2023
1 parent 48c3950 commit 868196d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -676,9 +676,10 @@ public static void register() {
return null;
}
ChunkSnapshot snapshot = chunk.getChunkSnapshot();
int sub = NMSHandler.getVersion().isAtLeast(NMSVersion.v1_18) ? 0 : 1;
for (int x = 0; x < 16; x++) {
for (int z = 0; z < 16; z++) {
surface_blocks.addObject(new LocationTag(chunk.getWorld(), chunk.getX() << 4 | x, snapshot.getHighestBlockYAt(x, z) - 1, chunk.getZ() << 4 | z));
surface_blocks.addObject(new LocationTag(chunk.getWorld(), chunk.getX() << 4 | x, snapshot.getHighestBlockYAt(x, z) - sub, chunk.getZ() << 4 | z));
}
}
return surface_blocks;
Expand Down

0 comments on commit 868196d

Please sign in to comment.