forked from VoxeLibre/VoxeLibre
Fix crash when dispensing spawn egg
This commit is contained in:
parent
c54019a8ab
commit
8950455026
|
@ -388,8 +388,7 @@ local dispenserdef = {
|
||||||
-- Place spawn egg
|
-- Place spawn egg
|
||||||
if not dropnodedef.walkable then
|
if not dropnodedef.walkable then
|
||||||
pointed_thing = { above = droppos, under = { x=droppos.x, y=droppos.y-1, z=droppos.z } }
|
pointed_thing = { above = droppos, under = { x=droppos.x, y=droppos.y-1, z=droppos.z } }
|
||||||
|
minetest.add_entity(droppos, stack:get_name())
|
||||||
minetest.registered_items[iname].on_place(ItemStack(iname), nil, pointed_thing)
|
|
||||||
|
|
||||||
stack:take_item()
|
stack:take_item()
|
||||||
inv:set_stack("main", stack_id, stack)
|
inv:set_stack("main", stack_id, stack)
|
||||||
|
|
Loading…
Reference in New Issue