From: paramat Date: Thu, 22 Oct 2015 17:54:18 +0000 (+0100) Subject: Default/functions: ABM for mossycobble replacing cobble next to water X-Git-Tag: 0.4.14~197 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2729777b943413323550d7891ea6df8861376598;p=oweals%2Fminetest_game.git Default/functions: ABM for mossycobble replacing cobble next to water --- diff --git a/mods/default/functions.lua b/mods/default/functions.lua index 50f481f6..7ba71fec 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -306,7 +306,7 @@ minetest.register_abm({ -- --- Grass growing +-- Grass growing on well-lit dirt -- minetest.register_abm({ @@ -329,6 +329,11 @@ minetest.register_abm({ end }) + +-- +-- Grass and dry grass removed in darkness +-- + minetest.register_abm({ nodenames = {"default:dirt_with_grass", "default:dirt_with_dry_grass"}, interval = 2, @@ -345,3 +350,18 @@ minetest.register_abm({ end }) + +-- +-- Moss growth on cobble near water +-- + +minetest.register_abm({ + nodenames = {"default:cobble"}, + neighbors = {"group:water"}, + interval = 17, + chance = 200, + catch_up = false, + action = function(pos, node) + minetest.set_node(pos, {name = "default:mossycobble"}) + end +})