From 1d91d94ee6189498d1c2da072dc6deb5a11ea346 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 12 Jun 2017 22:25:21 +0200 Subject: [PATCH] Don't erase shulke box contents on dispenser place --- mods/ITEMS/REDSTONE/mcl_dispensers/init.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua index d36d0c3a13..87032d607d 100644 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua @@ -317,12 +317,15 @@ local dispenserdef = { end end - elseif igroups.head or igroups.shulker_box or iname == "mcl_farming:pumpkin_face" then - -- Place head, shulker box, or pumpkin as node + elseif igroups.shulker_box then + -- Place shulker box as node if dropnodedef.buildable_to then 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() - inv:set_stack("main", stack_id, stack) end elseif igroups.spawn_egg then