0
0
Fork 0

quick fix of attempt to index local 'node' (nil value) at mods/ENTITIES/mcl_mobs/api.lua:3392

This commit is contained in:
kay27 2020-12-03 23:48:26 +04:00
parent 09ccfc9802
commit 945260fa29
1 changed files with 7 additions and 5 deletions

View File

@ -3387,11 +3387,13 @@ local mob_step = function(self, dtime)
end end
-- Add water flowing for mobs from mcl_item_entity -- Add water flowing for mobs from mcl_item_entity
local p = self.object:get_pos() local p, node, nn, def
local node = minetest.get_node_or_nil(p) p = self.object:get_pos()
local nn = node.name node = minetest.get_node_or_nil(p)
local def = minetest.registered_nodes[nn] if node then
nn = node.name
def = minetest.registered_nodes[nn]
end
-- Move item around on flowing liquids -- Move item around on flowing liquids
if def and def.liquidtype == "flowing" then if def and def.liquidtype == "flowing" then