Fix surface voxel detection logic
This commit is contained in:
parent
34bcae4693
commit
ea84b43158
|
@ -422,12 +422,12 @@ impl BrickmapManager {
|
||||||
if x == 0 || x == 7 || y == 0 || y == 7 || z == 0 || z == 7 {
|
if x == 0 || x == 7 || y == 0 || y == 7 || z == 0 || z == 7 {
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
!(block[idx + 1] == empty_voxel
|
center_block[idx + 1] == empty_voxel
|
||||||
&& block[idx - 1] == empty_voxel
|
|| center_block[idx - 1] == empty_voxel
|
||||||
&& block[idx + 8] == empty_voxel
|
|| center_block[idx + 8] == empty_voxel
|
||||||
&& block[idx - 8] == empty_voxel
|
|| center_block[idx - 8] == empty_voxel
|
||||||
&& block[idx + 64] == empty_voxel
|
|| center_block[idx + 64] == empty_voxel
|
||||||
&& block[idx - 64] == empty_voxel)
|
|| center_block[idx - 64] == empty_voxel
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set the appropriate bit in the z entry and add the
|
// Set the appropriate bit in the z entry and add the
|
||||||
|
|
Loading…
Reference in New Issue