minetest / minetest

Minetest is an open source voxel game-creation platform with easy modding and game creation
https://www.minetest.net/
Other
10.62k stars 2k forks source link

VoxelManip.find_nodes_in_area #14926

Open kno10 opened 1 month ago

kno10 commented 1 month ago

Problem

To use minetest.find_nodes_in_area you have to first write the data back from voxelmanip before you can do more manipulations.

Solutions

Add similar functionality to the voxel manipulator directly.

Alternatives

Any benefits of writing back? It seems to be rather costly.

Additional context

No response

sfan5 commented 1 month ago

As of 62629939ff creating a API function for this that operates on VManips is trivial.

kno10 commented 1 month ago

It would also be nice to have get_node_raw in VManips, as a public API. Maybe it is beneficial to implement get_node_at then in Lua instead of C++, as done for minetest.get_node?