diff --git a/mods/default/functions.lua b/mods/default/functions.lua index c5245f76..12f510d1 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -118,6 +118,20 @@ function on_punchnode(p, node) end minetest.register_on_punchnode(on_punchnode) +-- +-- Snow Behavior +-- + +--turn dirt_with_snow into dirt_with_grass when snow digged +minetest.register_on_dignode(function(pos, oldnode, digger) + if oldnode.name == "default:snow" then + pos.y = pos.y-1 + if minetest.env:get_node(pos).name == "default:dirt_with_snow" then + minetest.env:set_node(pos, {name="default:dirt_with_grass"}) + end + end +end) + -- -- Lavacooling --