Fix crash when dispensing spawn egg

This commit is contained in:
Wuzzy 2018-01-27 03:55:59 +01:00
parent c54019a8ab
commit 8950455026

View file

@ -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)