Fix surface voxel detection logic

This commit is contained in:
Jarrod Doyle 2023-07-27 22:09:26 +01:00
parent 34bcae4693
commit ea84b43158
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 6 additions and 6 deletions

View File

@ -422,12 +422,12 @@ impl BrickmapManager {
if x == 0 || x == 7 || y == 0 || y == 7 || z == 0 || z == 7 {
true
} else {
!(block[idx + 1] == empty_voxel
&& block[idx - 1] == empty_voxel
&& block[idx + 8] == empty_voxel
&& block[idx - 8] == empty_voxel
&& block[idx + 64] == empty_voxel
&& block[idx - 64] == empty_voxel)
center_block[idx + 1] == empty_voxel
|| center_block[idx - 1] == empty_voxel
|| center_block[idx + 8] == empty_voxel
|| center_block[idx - 8] == empty_voxel
|| center_block[idx + 64] == empty_voxel
|| center_block[idx - 64] == empty_voxel
};
// Set the appropriate bit in the z entry and add the