Page 1 of 1

How do I get a list of all positions in a chunk on generation?

PostPosted: Tue Jul 23, 2013 18:02
by scifiboi
I'm trying to get a list of every node position in a chunk including the air nodes. How can I do this? I tried doing minetest.env:find_nodes_in_area(minp, maxp, {}). The problem is, as far as I know, you can't get a list of EVERY position in that chunk with that function. Does anybody know how to do this? If I'm not making myself clear enough, just ask and sorry. I just really suck at explaining things. :P Thanks, everybody who replies!

PostPosted: Tue Jul 23, 2013 22:05
by PilzAdam
I dont see a problem here, just use find_nodes_in_area().

PostPosted: Wed Jul 24, 2013 00:06
by scifiboi
But can I use that function to get a list of ALL the nodes in a chunk some how? As far as I can see, you have to specify which nodes you want it to search for in the third argument of that function.

PostPosted: Wed Jul 24, 2013 06:22
by webdesigner97
what if you leave the 3rd argument empty ("")?

PostPosted: Wed Jul 24, 2013 10:10
by PilzAdam
Ah, now I get what you want.

You should look into the LuaVoxelManipulator. It gives you a table with IDs of the nodes.

PostPosted: Wed Jul 24, 2013 23:39
by scifiboi
Thank you a lot! I thought for sure that by the way you first replied, I asked a REALLY simple question. haha. But thanks for showing me this. It looks really interesting and I will definitely have a look at it.