Dispensers now support spawn eggs
This commit is contained in:
parent
7c3bf9715a
commit
5df8579e88
2 changed files with 16 additions and 3 deletions
|
@ -298,6 +298,17 @@ local dispenserdef = {
|
|||
end
|
||||
end
|
||||
|
||||
elseif igroups.spawn_egg then
|
||||
-- Place spawn egg
|
||||
if not dropnodedef.walkable then
|
||||
pointed_thing = { above = droppos, under = { x=droppos.x, y=droppos.y-1, z=droppos.z } }
|
||||
|
||||
minetest.registered_items[iname].on_place(ItemStack(iname), nil, pointed_thing)
|
||||
|
||||
stack:take_item()
|
||||
inv:set_stack("main", stack_id, stack)
|
||||
end
|
||||
|
||||
-- TODO: Many other dispenser actions
|
||||
else
|
||||
-- Drop item
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue