Skip to content

Commit

Permalink
Default/functions: ABM for mossycobble replacing cobble next to water
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat committed Oct 25, 2015
1 parent f3dc782 commit 2729777
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion mods/default/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ minetest.register_abm({


--
-- Grass growing
-- Grass growing on well-lit dirt
--

minetest.register_abm({
Expand All @@ -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,
Expand All @@ -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
})

0 comments on commit 2729777

Please sign in to comment.