Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_node("pushblocks:pushstone", {
description = "Test Pushstone",
tiles = {"default_cobble.png"},
is_ground_content = true,
groups = {cracky=3},
})
minetest.register_on_punchnode(function(pos, node, puncher)
if node.name == "pushblocks:pushstone" then
if minetest.dir_to_facedir(puncher:get_look_dir()) == 0 then
pos.z = pos.z + 1
if minetest.env:get_node(pos).name == "air" then
minetest.env:add_node(pos,{name = "pushblocks:pushstone"})
pos.z = pos.z - 1
minetest.env:remove_node(pos)
end
end
end
end)