Page 1 of 1

How to check if..

PostPosted: Sat Apr 14, 2012 10:13
by Jordach
There is "air" or "CONTENT_IGNORE?" above a node?

I am attempting ti work out some clever nodal work and I need to check the above node to make sure that the lower node changes too, this is FOR ANY NODE, NOT JUST "default:dirt_with_grass" maybe al types of nodes, except signs, torches, apples, maybe others, but I need help with this.

This also MUST have a height check to make sure it is above ground, I don't want it to happen where it is covered over.

PostPosted: Sat Apr 14, 2012 10:47
by sfan5
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
pos= {x=x,y=y+1,z=z}
n = minetest.env:get_node(pos)
if n.name == "air" then
  print "Air"
end
if n.name == "ignore" then
  print "Ignore"
end

PostPosted: Sat Apr 14, 2012 12:00
by Jordach
Ah. My mistake.

Time to make a PERFECTED Snow mod.