From ec9da88ab027c5c0cd8582966d6ebe25920886b4 Mon Sep 17 00:00:00 2001 From: Splizard Date: Wed, 19 Dec 2012 20:54:14 +1300 Subject: [PATCH] Make snow covered papyrus not fall apart when dug. --- init.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/init.lua b/init.lua index a2f7489..bb00aa8 100644 --- a/init.lua +++ b/init.lua @@ -349,6 +349,13 @@ minetest.register_node("snow:snow_block", { local n = minetest.env:get_node(pos).name if n == "air" or n == "default:water_flowing" or n == "default:water_source" then minetest.env:add_node(pos,{name="default:papyrus"}) + pos.y = pos.y + 1 + local n = minetest.env:get_node(pos) + if n.name == "snow:snow_block" and n.param2 == 2 then + minetest.env:remove_node(pos) + pos.y = pos.y - 1 + minetest.env:add_node(pos,{name="snow:snow_block",param2=2}) + end end elseif node.param2 == 3 then local n = minetest.env:get_node(pos).name