From 4196fd0c4f17d6fc3597c6861582b03f87307b27 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 30 Sep 2024 07:47:31 +0100 Subject: [PATCH] check actual block for out of bounds --- tool.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool.lua b/tool.lua index 56f859d..541f5b9 100644 --- a/tool.lua +++ b/tool.lua @@ -81,8 +81,8 @@ minetest.register_craftitem("protector:tool", { return end - -- do not place protector out of map bounds - if minetest.find_node_near(pos, 1, {"ignore", "mcl_core:bedrock"}) then + -- do not place protector out of map bounds or replace bedrock + if #minetest.find_nodes_in_area(pos, pos, {"ignore", "mcl_core:bedrock"}) > 0 then minetest.chat_send_player(name, S("Out of bounds!"))