summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pipeworks/autocrafter.lua2
-rw-r--r--pipeworks/item_transport.lua5
-rw-r--r--pipeworks/sorting_tubes.lua2
3 files changed, 6 insertions, 3 deletions
diff --git a/pipeworks/autocrafter.lua b/pipeworks/autocrafter.lua
index 6d00a7c..648a610 100644
--- a/pipeworks/autocrafter.lua
+++ b/pipeworks/autocrafter.lua
@@ -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)
diff --git a/pipeworks/item_transport.lua b/pipeworks/item_transport.lua
index e38125d..ee17611 100644
--- a/pipeworks/item_transport.lua
+++ b/pipeworks/item_transport.lua
@@ -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
diff --git a/pipeworks/sorting_tubes.lua b/pipeworks/sorting_tubes.lua
index 795291b..6d432ae 100644
--- a/pipeworks/sorting_tubes.lua
+++ b/pipeworks/sorting_tubes.lua
@@ -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