@@ -791,6 +791,10 @@ void MapgenBasic::dustTopNodes()
791
791
if (biome->c_dust == CONTENT_IGNORE)
792
792
continue ;
793
793
794
+ // Check if mapchunk above has generated, if so, drop dust from 16 nodes
795
+ // above current mapchunk top, above decorations that will extend above
796
+ // the current mapchunk. If the mapchunk above has not generated, it
797
+ // will provide this required dust when it does.
794
798
u32 vi = vm->m_area .index (x, full_node_max.Y , z);
795
799
content_t c_full_max = vm->m_data [vi].getContent ();
796
800
s16 y_start;
@@ -819,14 +823,15 @@ void MapgenBasic::dustTopNodes()
819
823
820
824
content_t c = vm->m_data [vi].getContent ();
821
825
NodeDrawType dtype = ndef->get (c).drawtype ;
822
- // Only place on walkable cubic non-liquid nodes
823
- // Dust check needed due to vertical overgeneration
826
+ // Only place on cubic, walkable, non-dust nodes.
827
+ // Dust check needed due to avoid double layer of dust caused by
828
+ // dropping dust from 16 nodes above mapchunk top.
824
829
if ((dtype == NDT_NORMAL ||
830
+ dtype == NDT_ALLFACES ||
825
831
dtype == NDT_ALLFACES_OPTIONAL ||
826
- dtype == NDT_GLASSLIKE_FRAMED_OPTIONAL ||
827
832
dtype == NDT_GLASSLIKE ||
828
833
dtype == NDT_GLASSLIKE_FRAMED ||
829
- dtype == NDT_ALLFACES ) &&
834
+ dtype == NDT_GLASSLIKE_FRAMED_OPTIONAL ) &&
830
835
ndef->get (c).walkable && c != biome->c_dust ) {
831
836
VoxelArea::add_y (em, vi, 1 );
832
837
vm->m_data [vi] = MapNode (biome->c_dust );
0 commit comments