WorldProxy
Description
API for interacting with world voxels.
Methods
void DestroyVoxels(List<Vector3Int> voxels)
- Description: Destroys voxels (sets them to air).
void SetVoxels(List<Vector3Int> voxels, Color32 color, bool notBreakable)
- Description: Places voxels with a specific color. Note: voxels created will be unlinked so they can stay flying. It is modders responsibility to remove any flying voxels.
VoxelFlags GetVoxelFlags(Vector3Int position)
- Description: Gets voxel flags by position.
Color32 GetVoxelColor(Vector3Int position)
void PlaceVoxels(List<Vector3Int> positions, Color32 color)
- Description: Attempts to link voxels to the world and place them. If linking fails then blocks wont be placed. Ideally the first position in the list is 6-connected to the world and every other voxel is linked to the first position (directly or indirectly).
Vector3Int GetWorldVoxelDimensions()
void Save(string path)
- Description: Saves the world in .vxl format. May cause lag for the moment.
- Parameters:
path: full path where the file will be stored