mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-29 17:17:29 +01:00
Changed item_drop to add_item for items dropped during transport.
item_drop makes Minetest 0.4.13 crash, but add_item works in all versions and the behavior is identical when looking at the blocks.
This commit is contained in:
parent
a107ca40f0
commit
e30364b2dd
@ -249,7 +249,10 @@ luaentity.register_entity("pipeworks:tubed_item", {
|
|||||||
if not found_next then
|
if not found_next then
|
||||||
drop_pos = minetest.find_node_near(vector.add(self.start_pos, velocity), 1, "air")
|
drop_pos = minetest.find_node_near(vector.add(self.start_pos, velocity), 1, "air")
|
||||||
if drop_pos then
|
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()
|
self:remove()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user