Add snowball and egg to dispenser support

This commit is contained in:
Wuzzy 2017-02-14 23:54:06 +01:00
parent a9f2c705da
commit e672abd2ed
2 changed files with 10 additions and 1 deletions

View file

@ -92,6 +92,15 @@ local dispenserdef = {
stack:take_item()
inv:set_stack("main", stack_id, stack)
elseif iname == "mcl_throwing:egg" or iname == "mcl_throwing:snowball" then
-- Throw egg or snowball
local f = {x=dropdir.x, y=0, z=dropdir.z}
local shootpos = vector.add(droppos, f)
mcl_throwing.throw(iname, shootpos, dropdir)
stack:take_item()
inv:set_stack("main", stack_id, stack)
elseif iname == "mcl_fire:flint_and_steel" then
-- Ignite air or fire
if dropnode.name == "air" then