From e7aa87396822ae1b7327b626a0d5280c6a99aac3 Mon Sep 17 00:00:00 2001 From: kay27 Date: Sun, 13 Dec 2020 03:09:32 +0400 Subject: [PATCH] Fix https://git.minetest.land/EliasFleckenstein03/MineClone2/issues/3 --- 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 af4a1cfe33..a6f0fd0957 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -405,7 +405,7 @@ local is_node_waterhazard = function(self, nodename) return true end end - if minetest.registered_nodes[nn].drowning > 0 then + if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].drowning and minetest.registered_nodes[nn].drowning > 0 then if self.breath_max ~= -1 then -- check if the mob is water-breathing _and_ the block is water; only return true if neither is the case -- this will prevent water-breathing mobs to classify water or e.g. sand below them as dangerous