From f834cf78c14ef30f9cf5e66c1d801814e700b376 Mon Sep 17 00:00:00 2001 From: Niklp Date: Sun, 26 Nov 2023 18:02:11 +0100 Subject: [PATCH] Fix nil error in `find_target()` --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index d1de3ac..dc54521 100644 --- a/init.lua +++ b/init.lua @@ -306,7 +306,7 @@ local function find_target(raycast) local above_node = minetest.get_node(above_pos) local above_def = minetest.registered_nodes[above_node.name] - if above_def.buildable_to and ((under_def and not under_def.buildable_to) or not under_def) then + if above_def and above_def.buildable_to and ((under_def and not under_def.buildable_to) or not under_def) then return next_pointed end