Skip to content

Commit

Permalink
Mapgen v6: Use snow blocks in tundra and remove them from taiga (#5827)
Browse files Browse the repository at this point in the history
* Mapgen v6: Use snow blocks in tundra and remove them from taiga

* Use snowblocks in tundra above dirt with snow
  • Loading branch information
CasimirKaPazi authored and nerzhul committed Jun 4, 2017
1 parent 7786521 commit 0e58168
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/mapgen_v6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,14 +1002,13 @@ void MapgenV6::placeTreesAndJungleGrass()
continue;

v3s16 p(x, y, z);
// Trees grow only on mud and grass and snowblock
// Trees grow only on mud and grass
{
u32 i = vm->m_area.index(p);
content_t c = vm->m_data[i].getContent();
if (c != c_dirt &&
c != c_dirt_with_grass &&
c != c_dirt_with_snow &&
c != c_snowblock)
c != c_dirt_with_snow)
continue;
}
p.Y++;
Expand Down Expand Up @@ -1064,15 +1063,15 @@ void MapgenV6::growGrass() // Add surface nodes
content_t c = vm->m_data[i].getContent();
if (surface_y >= water_level - 20) {
if (bt == BT_TAIGA && c == c_dirt) {
vm->m_data[i] = n_snowblock;
vm->m_area.add_y(em, i, -1);
vm->m_data[i] = n_dirt_with_snow;
} else if (bt == BT_TUNDRA) {
if (c == c_dirt) {
vm->m_data[i] = n_snowblock;
vm->m_area.add_y(em, i, -1);
vm->m_data[i] = n_dirt_with_snow;
} else if (c == c_stone && surface_y < node_max.Y) {
vm->m_area.add_y(em, i, 1);
vm->m_data[i] = n_snow;
vm->m_data[i] = n_snowblock;
}
} else if (c == c_dirt) {
vm->m_data[i] = n_dirt_with_grass;
Expand Down

0 comments on commit 0e58168

Please sign in to comment.