Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- mecom.lua
- --
- -- Test auf ME-Controller unter CC
- --
- -- written in 03/2022 by Kay Michaelsen
- --
- meco = {}
- chest = {}
- liste = {}
- trans = {}
- vars = {}
- tableString = ""
- meco = peripheral.wrap("back")
- chest = peripheral.wrap("bottom")
- print(peripheral.getName(meco))
- print(peripheral.getName(chest))
- liste = meco.listAvailableItems()
- vars.liste = liste
- tableString = textutils.serialise(vars)
- function FindSlot(fItemname,fAnzahl)
- local Nummer = 0
- local item = {}
- local slot = 0
- local Anz = 0
- for slot,item in pairs(liste) do
- if item.name == fItemname then
- Nummer = slot
- Anz = meco.pushItems(peripheral.getName(chest),fAnzahl)
- print(Anz)
- break
- end
- end
- return Nummer
- end
- print("Cobblestone: ", FindSlot("minecraft:cobblestone", 500))
- print("Redstone: ", FindSlot("minecraft:redstone",64))
Add Comment
Please, Sign In to add comment