1
0
Fork 0

Add TNT support to dispenser

This commit is contained in:
Wuzzy 2017-02-14 03:30:10 +01:00
parent b92a220e49
commit eaeebd900b
1 changed files with 10 additions and 0 deletions

View File

@ -94,10 +94,20 @@ local dispenserdef = {
end end
inv:set_stack("main", stack_id, stack) inv:set_stack("main", stack_id, stack)
elseif iname == "mcl_tnt:tnt" then
-- Place and ignite TNT
if dropnodedef.buildable_to then
minetest.set_node(droppos, {name = iname})
tnt.ignite(droppos)
stack:take_item()
inv:set_stack("main", stack_id, stack)
end
elseif igroups.head or igroups.shulker_box or iname == "mcl_farming:pumpkin_face" then elseif igroups.head or igroups.shulker_box or iname == "mcl_farming:pumpkin_face" then
-- Place head, shulker box, or pumpkin -- Place head, shulker box, or pumpkin
if dropnodedef.buildable_to then if dropnodedef.buildable_to then
minetest.set_node(droppos, {name = iname, param2 = node.param2}) minetest.set_node(droppos, {name = iname, param2 = node.param2})
stack:take_item() stack:take_item()
inv:set_stack("main", stack_id, stack) inv:set_stack("main", stack_id, stack)
end end