update pipeworks
This commit is contained in:
parent
c7a0c3ae0b
commit
2368b5c948
@ -223,7 +223,7 @@ local function upgrade_autocrafter(pos, meta)
|
||||
if not recipe then return end
|
||||
for idx, stack in ipairs(recipe) do
|
||||
if not stack:is_empty() then
|
||||
minetest.item_drop(stack, nil, pos)
|
||||
minetest.add_item(pos, stack)
|
||||
stack:set_count(1)
|
||||
stack:set_wear(0)
|
||||
inv:set_stack("recipe", idx, stack)
|
||||
|
@ -249,7 +249,10 @@ luaentity.register_entity("pipeworks:tubed_item", {
|
||||
if not found_next then
|
||||
drop_pos = minetest.find_node_near(vector.add(self.start_pos, velocity), 1, "air")
|
||||
if drop_pos then
|
||||
minetest.item_drop(stack, nil, drop_pos)
|
||||
-- Using add_item instead of item_drop since this makes pipeworks backward
|
||||
-- compatible with Minetest 0.4.13.
|
||||
-- Using item_drop here makes Minetest 0.4.13 crash.
|
||||
minetest.add_item(drop_pos, stack)
|
||||
self:remove()
|
||||
return
|
||||
end
|
||||
|
@ -6,7 +6,7 @@ if pipeworks.enable_mese_tube then
|
||||
local inv = meta:get_inventory()
|
||||
for i = 1, 6 do
|
||||
for _, stack in ipairs(inv:get_list("line"..i)) do
|
||||
minetest.item_drop(stack, nil, pos)
|
||||
minetest.add_item(pos, stack)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user