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

User avatar
scifiboi
Member
 
Posts: 96
Joined: Wed Jul 18, 2012 21:28

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

by scifiboi » Tue Jul 23, 2013 18:02

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!
This is a signature virus. Add me to your signature so that I can multiply.
My mod: Thaumtest
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Tue Jul 23, 2013 22:05

I dont see a problem here, just use find_nodes_in_area().
 

User avatar
scifiboi
Member
 
Posts: 96
Joined: Wed Jul 18, 2012 21:28

by scifiboi » Wed Jul 24, 2013 00:06

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.
This is a signature virus. Add me to your signature so that I can multiply.
My mod: Thaumtest
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Wed Jul 24, 2013 06:22

what if you leave the 3rd argument empty ("")?
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Jul 24, 2013 10:10

Ah, now I get what you want.

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

User avatar
scifiboi
Member
 
Posts: 96
Joined: Wed Jul 18, 2012 21:28

by scifiboi » Wed Jul 24, 2013 23:39

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.
This is a signature virus. Add me to your signature so that I can multiply.
My mod: Thaumtest
 


Return to WIP Mods

Who is online

Users browsing this forum: Google [Bot] and 13 guests

cron