Skip to content

Commit 1ef8f7a

Browse files
committed
Fix lava of detectInvisibleSingleBlock
1 parent b8ad6c9 commit 1ef8f7a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bukkit/version/v1_18/src/main/kotlin/io/github/rothes/esu/bukkit/module/networkthrottle/chunkdatathrottle/v1_18/ChunkDataThrottleHandlerImpl.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,9 @@ class ChunkDataThrottleHandlerImpl: ChunkDataThrottleHandler,
428428
if (invisible[id] != BV_INVISIBLE) continue // Center block is invisible
429429
val x = id and 0xf
430430
val z = id shr 4 and 0xf
431-
// Surrounded blocks are all visible and upper block occluding
432-
if (invisible[id - 0x100] != BV_VISIBLE || invisible[id + 0x100] != BV_UPPER_OCCLUDING) continue
431+
// Surrounded blocks are visible and upper block occluding
432+
if (invisible[id - 0x100] == BV_INVISIBLE) continue // Could be BV_LAVA_COVERED and BV_VISIBLE, due to center block
433+
if (invisible[id + 0x100] and BV_UPPER_OCCLUDING != BV_UPPER_OCCLUDING) continue
433434
if (x != 0 && invisible[id - 0x001] and BV_UPPER_OCCLUDING != BV_UPPER_OCCLUDING) continue
434435
if (x != 15 && invisible[id + 0x001] and BV_UPPER_OCCLUDING != BV_UPPER_OCCLUDING) continue
435436
if (z != 0 && invisible[id - 0x010] and BV_UPPER_OCCLUDING != BV_UPPER_OCCLUDING) continue

0 commit comments

Comments
 (0)