Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("hare")
- local cliArgs = {...}
- local length = tonumber(cliArgs[1])
- local width = tonumber(cliArgs[2])
- local distFd = tonumber(length * width + length + width)
- local a = "minecraft:cobblestone"
- local b = "minecraft:stone"
- local c = "minecraft:dirt"
- local d = "chisel:basalt2"
- function dropTrash()
- while hare.selectItem(a) do
- turtle.dropDown()
- end
- while hare.selectItem(b) do
- turtle.dropDown()
- end
- while hare.selectItem(c) do
- turtle.dropDown()
- end
- while hare.selectItem(d) do
- turtle.dropDown()
- end
- turtle.select(1)
- end
- function fuelCheck()
- while turtle.getFuelLevel() < distFd do
- hare.selectItem("minecraft:coal")
- turtle.refuel()
- end
- end
- function makeLap()
- dropTrash()
- fuelCheck()
- while turtle.detect() do
- turtle.dig()
- end
- while turtle.detectDown() do
- turtle.digDown()
- end
- while turtle.detectUp() do
- turtle.digUp()
- end
- end
- if length == nil or width == nil or cliArgs[1] == '?' then
- print('Usage: quarry <length> <width>')
- return
- end
- dropTrash()
- while true do
- turtle.dig()
- turtle.forward()
- hare.sweepMine(length, width, makeLap)
- print("Finished mining.")
- break
- end
Add Comment
Please, Sign In to add comment