forked from VoxeLibre/VoxeLibre
Fix crash placing mob spawners on unknown
This commit is contained in:
parent
681244de71
commit
43377ee4b9
|
@ -301,7 +301,8 @@ minetest.register_node("mcl_mobspawners:spawner", {
|
||||||
local new_itemstack, success = minetest.item_place(itemstack, placer, pointed_thing)
|
local new_itemstack, success = minetest.item_place(itemstack, placer, pointed_thing)
|
||||||
if success then
|
if success then
|
||||||
local placepos
|
local placepos
|
||||||
if minetest.registered_nodes[node_under.name].buildable_to then
|
local def = minetest.registered_nodes[node_under.name]
|
||||||
|
if def and def.buildable_to then
|
||||||
placepos = pointed_thing.under
|
placepos = pointed_thing.under
|
||||||
else
|
else
|
||||||
placepos = pointed_thing.above
|
placepos = pointed_thing.above
|
||||||
|
|
Loading…
Reference in New Issue