Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Components Definition
- local component = require("component")
- local sides = require("sides")
- local trans = component.proxy(component.get("133d"))
- local keyboard = require("keyboard")
- -- Variables Definition
- collector = sides.north
- andechest = sides.bottom
- diochest = sides.south
- phantom = sides.east
- trash = sides.top
- -- Function
- function clear()
- Item = nil
- Meta = nil
- Amount = 0
- end
- -- Main Code
- Amount = 0
- while true do
- for i = 1, 6 do
- Slot = nil
- Slot = trans.getStackInSlot(collector, i)
- if Slot == nil then os.sleep(2) end
- if Slot ~= nil then
- for k,v in pairs(Slot) do
- if k == "name" then Item = v end
- if k == "damage" then Meta = v end
- if k == "size" then Amount = v end
- if Item == "minecraft:stone" and Meta == 5 and Amount ~= 0 then
- for j = 1, Amount do
- trans.transferItem(collector,trash, 1,i,1)
- trans.transferItem(andechest,phantom, 1,1,2)
- os.sleep(.1)
- end
- clear()
- end
- if Item == "minecraft:stone" and Meta == 3 and Amount ~= 0 then
- for j= 1, Amount do
- trans.transferItem(collector,trash, 1,i,1)
- trans.transferItem(diochest,phantom, 1,1,1)
- os.sleep(.1)
- end
- clear()
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement