From 2e7bfdb412a1ee4d1c5e3dbbf694b3cde0a3a6ee Mon Sep 17 00:00:00 2001 From: CobaltXII Date: Wed, 2 Jan 2019 21:53:53 -0500 Subject: [PATCH] All cross blocks are destroyed and replaced by water --- src/main.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 6bdad34..e419216 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -720,6 +720,32 @@ int main(int argc, char** argv) block_timer = 10; } } + else + { + the_accessor->set_id_safe(px, py, pz, place_id); + + block_timer = 10; + } + + // All cross blocks are destroyed and replaced + // by water. + + if (is_cross(place_id)) + { + if + ( + the_world->get_id_safe(px + 1, py, pz) == id_water || + the_world->get_id_safe(px - 1, py, pz) == id_water || + + the_world->get_id_safe(px, py, pz + 1) == id_water || + the_world->get_id_safe(px, py, pz - 1) == id_water || + + the_world->get_id_safe(px, py - 1, pz) == id_water + ) + { + the_accessor->set_id_safe(px, py, pz, id_water); + } + } break; }