Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function findEmp ()
- for i=1,16 do
- if not turtle.getItemDetail(i) then
- return i
- end
- end
- end
- function arrComp (a,b)
- return textutils.serialise(a) == textutils.serialise(b)
- end
- function ObsGen ()
- return {
- {name="minecraft:cobblestone",count=24},
- {name="minecraft:cobblestone_slab",count=17},
- {name="pipez:item_pipe",count=32},
- {name="mekanism:ultimate_mechanical_pipe",count=20},
- {name="exnihilosequentia:stone_barrel",count=20},
- {name="minecraft:shulker_box",count=1}
- }
- end
- local function invTab ()
- local inv = {}
- for i=1,16 do
- local item = turtle.getItemDetail(i)
- inv[i]={idx=i,it=item}
- end
- return inv
- end
- function invItr ()
- local i=0
- inven = invTab()
- local n=#inven
- return function ()
- i=i+1
- if i <= n then return inven[i] end
- end
- end
- function getInv ()
- inv = {}
- i=1
- for slot in invItr() do
- if slot.it then
- inv[i]=slot.it
- i=i+1
- end
- end
- return inv
- end
- function findI (name)
- for slot in invItr() do
- if slot.it then
- if slot.it.name == name then
- return slot.idx
- end
- end
- end
- return 0
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement