Support Lua read/write access to voxels.

Please enable players to create "build" tools (e.g. Voxel Place) by providing a Lua interface to voxels. Consider a voxel to be made up of the following pair: a material "handle" and vertex definition. The material handle should have a well defined value identifying an "empty" voxel, but may be an opaque (but fixed) value. The vertex definition would consist of the offset (x,y,z) from the voxel origin. The location of a voxel's origin in a construct would be given using the construct's local coordinate system (X, Y, Z). The Lua API would consist of core functions to query the voxel material and vertex values, and a function to set those values. These functions would return an error value if the player is not in "build" mode (e.g. nil), or if the active inventory does not have the material being set (if different from the current material).
It would be useful in creating "build" tools to also have a method to query the coordinates of the corners of the current selection box.

Under consideration Suggested by: JayleBreak Upvoted: 15 Oct, '21

Comments: 2