Advertisement
LordMZTE

Untitled

Apr 8th, 2023 (edited)
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. local pipe = peripheral.wrap("bottom")
  2. local lp = pipe.getLP()
  3. local function it(id, meta)
  4. local b = lp.getItemIdentifierBuilder()
  5. b.setItemID(id)
  6. if meta then
  7. b.setItemData(meta)
  8. else
  9. end
  10. return b.build()
  11. end
  12. local keep = {[it("minecraft:glass")] = (64 * 4), [it("minecraft:stone")] = (64 * 4), [it("minecraft:torch")] = 64, [it("minecraft:stick")] = 64, [it("IC2:item.itemIngotAdvIron")] = (64 * 2), [it("Mekanism:Ingot", 4)] = (64 * 4), [it("Mekanism:EnrichedAlloy")] = 64, [it("Mekanism:ReinforcedAlloy")] = 64, [it("Mekanism:AtomicAlloy")] = 64, [it("ThermalFoundation:material", 73)] = 64, [it("Mekanism:ControlCircuit")] = 64, [it("minecraft:coal", 1)] = (64 * 8), [it("IC2:item.itemRubber")] = 64, [it("minecraft:chest")] = 64, [it("minecraft:piston")] = 64}
  13. while true do
  14. for item, want in pairs(keep) do
  15. local needed = (want - pipe.getItemAmount(item))
  16. if (needed > 0) then
  17. print("Req: ", needed, " x ", item.getName())
  18. pipe.makeRequest(item, needed, true)
  19. else
  20. end
  21. end
  22. os.sleep((60 * 10))
  23. end
  24. return nil
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement