Skip to content

Commit 5090713

Browse files
committed
fix edge case infinite loop in mesher
1 parent 99d05fc commit 5090713

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

renderer/viewer/lib/mesher/mesher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const handleMessage = data => {
161161
blockPos.z = blockZ
162162
blockPos.y = world.config.worldMaxY
163163
let block = world.getBlock(blockPos)
164-
while (block && INVISIBLE_BLOCKS.has(block.name)) {
164+
while (block && INVISIBLE_BLOCKS.has(block.name) && blockPos.y > world.config.worldMinY) {
165165
blockPos.y -= 1
166166
block = world.getBlock(blockPos)
167167
}

0 commit comments

Comments
 (0)