diff options
author | Novatux <nathanael.courant@laposte.net> | 2014-01-10 21:26:14 +0100 |
---|---|---|
committer | Novatux <nathanael.courant@laposte.net> | 2014-01-10 21:26:14 +0100 |
commit | 466d8af41dcd2d9c7949b9cc40527973f4884d0b (patch) | |
tree | c6e06f14f74d7cae3942d07f0e5e8135705677b2 | |
parent | 3250b00d5abce8ea6db3f6217eb63bdbdf3d9f31 (diff) | |
download | pipeworks-466d8af41dcd2d9c7949b9cc40527973f4884d0b.tar pipeworks-466d8af41dcd2d9c7949b9cc40527973f4884d0b.tar.gz pipeworks-466d8af41dcd2d9c7949b9cc40527973f4884d0b.tar.bz2 pipeworks-466d8af41dcd2d9c7949b9cc40527973f4884d0b.tar.xz pipeworks-466d8af41dcd2d9c7949b9cc40527973f4884d0b.zip |
Prevent items from leaving below filters
-rw-r--r-- | item_transport.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/item_transport.lua b/item_transport.lua index af5a817..e67ef35 100644 --- a/item_transport.lua +++ b/item_transport.lua @@ -73,8 +73,8 @@ local function grabAndFire(frominv,frominvname,frompos,fromnode,sname,tube,idef, idef.on_metadata_inventory_take(frompos, "main", spos, item, fakePlayer) end end - local item1 = pipeworks.tube_item(frompos, item) - item1:get_luaentity().start_pos = frompos + local item1 = pipeworks.tube_item(vector.add(frompos, vector.multiply(dir, 1.4)), item) + item1:get_luaentity().start_pos = vector.add(frompos, dir) item1:setvelocity(dir) item1:setacceleration({x=0, y=0, z=0}) return true-- only fire one item, please @@ -142,8 +142,8 @@ minetest.register_node("pipeworks:filter", { end end if inv:is_empty("main") then - grabAndFire(frominv,frominvname,frompos,fromnode,nil,tube,idef,dir) - end + grabAndFire(frominv,frominvname,frompos,fromnode,nil,tube,idef,dir) + end end, }) |