Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.openTab("shell")
- function rotate180()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function suckAndDrop(slot)
- local MC_STACK_DEFAULT_SIZE = 64
- turtle.select(slot)
- if (turtle.getItemDetail(slot) and turtle.getItemDetail(slot).count < MC_STACK_DEFAULT_SIZE) or (turtle.getItemDetail(slot) == nil) then
- local itemsNeededToFillStack = MC_STACK_DEFAULT_SIZE - (turtle.getItemDetail(slot) and turtle.getItemDetail(slot).count or 0)
- turtle.suck(itemsNeededToFillStack)
- end
- turtle.dropDown()
- end
- while peripheral.find("NBT_Observer").read_state().facing ~= "south" do
- turtle.turnLeft()
- end
- while true do
- local COAL_SLOT = 1
- local IRON_SLOT = 2
- local SEC_SLEEP = 1
- suckAndDrop(COAL_SLOT)
- rotate180()
- suckAndDrop(IRON_SLOT)
- rotate180()
- os.sleep(SEC_SLEEP)
- end
Add Comment
Please, Sign In to add comment