Advertisement
PeterCrawley

Untitled

Feb 21st, 2023
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.07 KB | None | 0 0
  1. package.preload["storage"]=(function(...)require("ulib")print("Storage Engine v1")local e={"create:zinc_nugget","createastral:copper_pickaxe","mcdw:sword_iron_sword_var","minecraft:arrow","minecraft:crossbow","minecraft:gold_nugget","minecraft:iron_nugget","minecraft:saddle","tconstruct:copper_nugget","techreborn:tin_nugget",}local e=0
  2. local n
  3. local r={}for e in(peripherals.find("inventory")).iterate()do
  4. r[e.name]=e
  5. if not n or e.size()>=n.size()then n=e end
  6. print("Found container \""..e.name.."\" of size",e.size())end
  7. print("Set interface container to \""..n.name.."\"")print("Startup complete")end)package.preload["ulib"]=(function(...)local e;if(tonumber((_VERSION or''):match('[%d.]*$'))or 0)<5.3 then local r,n=pcall(require,'compat53.module');if r then e=n end end;local r=e and e.ipairs or ipairs;peripherals={}Peripheral={}Inventory={}List={}function peripherals.find(e)local n={}for r,e in r({peripheral.find(e)})do
  8. e.name=peripheral.getName(e)n[r]=e
  9. end
  10. return n
  11. end
  12. function List.iterator(n)local e=0
  13. return function()e=e+1
  14. if e<=#n then return n[e]end
  15. end
  16. end
  17. end)
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement