We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a9b8aa commit c03c296Copy full SHA for c03c296
src/content_abm.cpp
@@ -51,11 +51,15 @@ class GrowGrassABM : public ActiveBlockModifier
51
ServerMap *map = &env->getServerMap();
52
53
MapNode n_top = map->getNodeNoEx(p+v3s16(0,1,0));
54
+ content_t c_snow = ndef->getId("snow");
55
if(ndef->get(n_top).light_propagates &&
56
!ndef->get(n_top).isLiquid() &&
57
n_top.getLightBlend(env->getDayNightRatio(), ndef) >= 13)
58
{
- n.setContent(ndef->getId("mapgen_dirt_with_grass"));
59
+ if(c_snow != CONTENT_IGNORE && n_top.getContent() == c_snow)
60
+ n.setContent(ndef->getId("dirt_with_snow"));
61
+ else
62
+ n.setContent(ndef->getId("mapgen_dirt_with_grass"));
63
map->addNodeWithEvent(p, n);
64
}
65
0 commit comments