Fixed unknown node bug
This commit is contained in:
parent
682a6ad9c4
commit
03730d4bdd
8
api.lua
8
api.lua
@ -1,4 +1,4 @@
|
||||
-- Mobs Api (29th March 2015)
|
||||
-- Mobs Api (31st March 2015)
|
||||
mobs = {}
|
||||
mobs.mod = "redo"
|
||||
|
||||
@ -843,10 +843,12 @@ function mobs:register_spawn(name, nodes, max_light, min_light, chance, active_o
|
||||
|
||||
-- are we spawning inside a solid node?
|
||||
local nod = minetest.get_node_or_nil(pos)
|
||||
if not nod or minetest.registered_nodes[nod.name].walkable == true then return end
|
||||
if not nod or not minetest.registered_nodes[nod.name]
|
||||
or minetest.registered_nodes[nod.name].walkable == true then return end
|
||||
pos.y = pos.y + 1
|
||||
nod = minetest.get_node_or_nil(pos)
|
||||
if not nod or minetest.registered_nodes[nod.name].walkable == true then return end
|
||||
if not nod or not minetest.registered_nodes[nod.name]
|
||||
or minetest.registered_nodes[nod.name].walkable == true then return end
|
||||
|
||||
if minetest.setting_getbool("display_mob_spawn") then
|
||||
minetest.chat_send_all("[mobs] Add "..name.." at "..minetest.pos_to_string(pos))
|
||||
|
Loading…
x
Reference in New Issue
Block a user