Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Welcome to MinerMover, this is dead simple program to move a digital miner every time it runs out of blocks to dig
- Requirements:
- 1. A fueled up mining turtle with a chunkloading peripheral,
- 2. a digital miner,
- 3. an enderchest equivalent to dump the ores,
- 4. and a method of power that does not require configuration upon placing(IE a preconfigured tesseract or fluxpoint)
- To start the program, name it startup, place a digital miner in slot 1, your power in slot 2, and the ender chest in slot three
- The program should be able to start itself back up and resume when shut down unexpectedly
- However if this happens midway through the break or build process, it will almost certainly break
- This has never happened in my testing, given how small the window of time for that is, but it can happen.
- The turtle will not mine it's way forward, so I recommend starting it high in the air, above any potential obstacles.
- ]]
- local function buildDigger()
- turtle.select(1)
- turtle.placeUp()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.select(2)
- turtle.placeUp()
- turtle.back()
- turtle.back()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.up()
- turtle.select(3)
- turtle.placeUp()
- turtle.down()
- turtle.back()
- turtle.back()
- peripheral.call("top", "start")
- print("Digger placed and started")
- end
- local function breakDigger()
- turtle.select(1)
- turtle.digUp()
- turtle.up()
- turtle.turnLeft()
- turtle.forward()
- turtle.select(2)
- turtle.dig()
- turtle.back()
- turtle.turnRight()
- turtle.forward()
- turtle.up()
- turtle.select(3)
- turtle.dig()
- turtle.down()
- turtle.down()
- end
- local function moveDigger()
- breakDigger()
- for i=1,65 do
- turtle.forward()
- end
- buildDigger()
- end
- if turtle.getItemCount(1) == 1 then
- buildDigger()
- end
- local running = true
- while running do
- if peripheral.call("top", "getToMine") ~= 0 then
- sleep(30)
- else
- moveDigger()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment