mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-20 09:53:46 +01:00
Don't erase shulke box contents on dispenser place
This commit is contained in:
parent
d4799b5144
commit
1d91d94ee6
@ -317,12 +317,15 @@ local dispenserdef = {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif igroups.head or igroups.shulker_box or iname == "mcl_farming:pumpkin_face" then
|
elseif igroups.shulker_box then
|
||||||
-- Place head, shulker box, or pumpkin as node
|
-- Place shulker box as node
|
||||||
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})
|
||||||
|
local imeta = stack:get_metadata()
|
||||||
|
local iinv_main = minetest.deserialize(imeta)
|
||||||
|
local ninv = minetest.get_inventory({type="node", pos=droppos})
|
||||||
|
ninv:set_list("main", iinv_main)
|
||||||
stack:take_item()
|
stack:take_item()
|
||||||
inv:set_stack("main", stack_id, stack)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif igroups.spawn_egg then
|
elseif igroups.spawn_egg then
|
||||||
|
Loading…
Reference in New Issue
Block a user