so lets say I have a node (default:dirt) at 0,0,0
when i hit this done (with on_punch) it checks the node at 0,1,0
After this it checks what the node at 0,1,0 and if its air it places a node there (default:dirt)
What i have tried'
Code: Select all
pos.y = pos.y + 1;
if minetest.find_node_near(
{x = pos.x, y = pos.y + height, z = pos.z }, 1, {"default:dirt"}) then
So if i place a node at 0,0,0 then hit it it will place a node at 0,1,0
However if i place a node at 0,0,1 it will detect the node at 0,0,0 and 0,1,0 and not place a node.
I have also the code shown below but it just crashes the game
Code: Select all
if minetest.find_node_in_area(
{x = pos.x, y = pos.y, z = pos.z },
{x = pos.x, y = pos.y, z = pos.z },
{"scaffolding:scaffolding"}) then
many thanks