public void Edit(int x, int y)
{
var newVT = VoxelType.Empty;
int voxIndex = x + y * CHUNK_VOXELS_DIM;
if (voxIndex < 0 || voxIndex >= CHUNK_VOXELS_DIM * CHUNK_VOXELS_DIM) {
return;
}
if (voxels[voxIndex].vtype != newVT) {
voxels[voxIndex].vtype = newVT;
RebuildMesh();
}
}