Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variaveis
- local isBlock, data
- local isWheat, wheat
- -- Funções
- function drop()
- wheat_seeds_info = turtle.getItemDetail(1)
- for i = 2, 16, 1 do
- turtle.select(i)
- actual_slot = turtle.getItemDetail(i)
- if (wheat_seeds_info.count < 64 and actual_slot ~= nil and actual_slot.name == "minecraft:wheat_seeds") then
- turtle.transferTo(1, 64)
- end
- turtle.dropDown()
- end
- sleep(600)
- end
- function inspect_wheat()
- isWheat, wheat = turtle.inspect()
- if (wheat.state.age == 7) then
- turtle.dig()
- turtle.select(1)
- turtle.place()
- end
- end
- function deepslate_harvester()
- turtle.turnLeft()
- for i = 0, 7, 1 do
- inspect_wheat()
- turtle.turnLeft()
- turtle.turnLeft()
- inspect_wheat()
- turtle.turnRight()
- if (i < 7) then
- turtle.forward()
- turtle.turnRight()
- end
- isBlock, data = turtle.inspect()
- if (data.name == "minecraft:cobblestone") then
- drop()
- end
- end
- end
- function glass_harvester()
- turtle.turnRight()
- for i = 0, 7, 1 do
- inspect_wheat()
- turtle.turnRight()
- turtle.turnRight()
- inspect_wheat()
- turtle.turnLeft()
- if (i < 7) then
- turtle.forward()
- turtle.turnLeft()
- end
- isBlock, data = turtle.inspect()
- if (data.name == "minecraft:deepslate_bricks") then
- drop()
- end
- end
- end
- -- Loop
- while true do
- -- Verifica qual bloco a turtle está olhando
- isBlock, data = turtle.inspect()
- -- Se estiver olhando stone, faça:
- if (data.name == "minecraft:deepslate_bricks") then
- deepslate_harvester()
- end
- -- Se estiver olhando cobblestone, faça:
- if (data.name == "minecraft:cobblestone") then
- glass_harvester()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement