From ee9cc5341b3fffc325715c464fb5ba1ecb1d54c9 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 15 Jul 2022 19:10:19 +0200 Subject: [PATCH] Fix villager crash when opening iron doors --- mods/ENTITIES/mcl_mobs/api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index da74f6918..5485e7cc1 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -2312,9 +2312,9 @@ local function check_doors(self) local def = minetest.registered_nodes[n.name] local closed = n.name:find("_b_1") if t < 0.3 or t > 0.8 then - if not closed then def.on_rightclick(d,n,self) end + if not closed and def.on_rightclick then def.on_rightclick(d,n,self) end else - if closed then def.on_rightclick(d,n,self) end + if closed and def.on_rightclick then def.on_rightclick(d,n,self) end end end