From 9490b36e25cf044cab30b6d34fdcf512c05f8a52 Mon Sep 17 00:00:00 2001 From: CobaltXII Date: Sat, 29 Dec 2018 15:22:40 -0500 Subject: [PATCH] Implemented inline void set_id --- src/inc/world.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/inc/world.hpp b/src/inc/world.hpp index 847eefd..cc39b5f 100644 --- a/src/inc/world.hpp +++ b/src/inc/world.hpp @@ -94,4 +94,11 @@ struct world return voxel_get_artificial(voxels[x + x_res * (y + y_res * z)]); } + + // Set the block_id information of the voxel at the specified coordinates. + + inline void set_id(unsigned int x, unsigned int y, unsigned int z, block_id id) + { + voxel_set_id(voxels[x + x_res * (y + y_res * z)], id); + } }; \ No newline at end of file