From 5e65777259323502df36d759ddc18c9ebee2c775 Mon Sep 17 00:00:00 2001 From: CobaltXII Date: Fri, 4 Jan 2019 16:17:23 -0500 Subject: [PATCH] Fixed blocks sometimes replacing other blocks when placed on the side of a slab --- src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 01aca33..97bb896 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -740,6 +740,13 @@ int main(int argc, char** argv) py -= iy * 0.001f; pz -= iz * 0.001f; + // Can't place blocks inside other blocks. + + if (the_world->get_id_safe(px, py, pz) != id_air) + { + break; + } + // Find the hitbox of the block that is going to // be placed.