You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
miner/mine.lua

34 lines
624 B

local robot = require("robot")
local nav = require("navigator")
local chest = require("chest")
local miner = require("miner")
ORES = {
'minecraft:iron_ore',
'minecraft:gold_ore',
'minecraft:coal',
'minecraft:diamond',
'minecraft:redstone',
'minecraft:dye', -- Lapis
}
print("Mining...")
-- mine, starts facing east, goes east and scans south
miner.mine(32)
-- ends facing "west"
robot.turnRight()
-- store items
print("Storing ores")
chest.store(ORES)
robot.turnLeft()
nav.forward(2)
robot.turnRight()
print("Storing the rest")
chest.store()
robot.turnRight()
nav.forward(2)
-- ends facing east