Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local config = {
- harvest = {
- name = "minecraft:cactus",
- instructions = {
- turltle.digDown,turtle.down,turtle.digDown,turtle.up,turtle.up,turtle.forward
- }
- }
- rightTurn = {
- name = "minecraft:stonebrick",
- instructions = {
- turtle.
- }
- }
- }
- local function exec(tbl)
- for _,v in pairs(tbl.instructions) do
- v()
- end
- end
- while true do
- local bool, block = turtle.inspectDown()
- if bool == true then
- if block == config.harvest.name then
- exec(config.harvest)
- elseif block == config.left.name then
- exec(config.left)
- elseif block == config.right.name then
- exec(config.right)
- elseif block == config.chest then
- exec(config.chest)
- elseif bool == false then
- turtle.forward()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement