From 4d4dd9f614d5ea5509584aa65ffc78d9b7717a55 Mon Sep 17 00:00:00 2001 From: philipmi Date: Wed, 7 Dec 2022 16:17:04 +0100 Subject: [PATCH] Add missing placer nil-check --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 5d9a0a2..9811be2 100644 --- a/init.lua +++ b/init.lua @@ -35,7 +35,7 @@ local add_fruit_regrowable = function(fruit, node, leaves) }) minetest.register_on_placenode(function(pos, newnode, placer) - if placer:is_player() and newnode.name == "cacaotree:pod" then + if placer and placer:is_player() and newnode.name == "cacaotree:pod" then minetest.set_node(pos, {name = "regrowing_fruits:cacao", param2 = newnode.param2}) end end)