From 8bcd36dbbeab53f64c02a80da0f1db6c59832592 Mon Sep 17 00:00:00 2001 From: CobaltXII Date: Wed, 2 Jan 2019 21:46:49 -0500 Subject: [PATCH] Can only place id_reeds on id_sand or id_reeds --- src/main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index d616179..824edd8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -704,6 +704,20 @@ int main(int argc, char** argv) block_timer = 10; } } + else if (place_id == id_reeds) + { + // Can only place id_reeds on id_sand or + // id_reeds. + + block_id reeds_below = the_world->get_id_safe(px, py + 1, pz); + + if (reeds_below == id_sand || reeds_below == id_reeds) + { + the_accessor->set_id_safe(px, py, pz, place_id); + + block_timer = 10; + } + } break; }