Make snow covered papyrus not fall apart when dug.

This commit is contained in:
Splizard 2012-12-19 20:54:14 +13:00
parent 4835a2b7f5
commit ec9da88ab0
1 changed files with 7 additions and 0 deletions

View File

@ -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