From 0ba7e4fc4db77c0d4d179ade4a4c38288a2c2f66 Mon Sep 17 00:00:00 2001 From: kay27 Date: Mon, 22 Feb 2021 13:40:40 +0400 Subject: [PATCH] Fix Runtime error: attempt to index a nil value (api.lua:399 <- is_node_dangerous <- is_at_cliff_or_danger <- on_step_old <- void_damage:16) --- mods/ENTITIES/mcl_mobs/api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index a45dae28da..50e9eec76b 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -396,7 +396,7 @@ local is_node_dangerous = function(self, nodename) return true end end - if minetest.registered_nodes[nn].damage_per_second and minetest.registered_nodes[nn].damage_per_second > 0 then + if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].damage_per_second and minetest.registered_nodes[nn].damage_per_second > 0 then return true end return false