Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Program made by gungun974
- I love potato!
- ]]--
- -- declaration
- -- function
- function potato()
- if getBlockDownMeta("minecraft:potatoes", 7) then
- slot2 = turtle.getItemDetail(2)
- if slot2 ~= nil then
- if slot2.name == "minecraft:poisonous_potato" then
- turtle.select(2)
- turtle.transferTo(4)
- turtle.select(1)
- end
- end
- turtle.digDown()
- end
- end
- function seed()
- if BlockDown() == false then
- turtle.placeDown()
- end
- end
- function getBlockDownMeta( block , meta )
- local succes, data = turtle.inspectDown()
- if succes then
- if data.name == block and data.metadata == meta then
- return true
- else
- return false
- end
- else
- return false
- end
- end
- function getBlockMeta( block , meta )
- local succes, data = turtle.inspect()
- if succes then
- if data.name == block and data.metadata == meta then
- return true
- else
- return false
- end
- else
- return false
- end
- end
- function getBlock( block )
- local succes, data = turtle.inspect()
- if succes then
- if data.name == block then
- return true
- else
- return false
- end
- else
- return false
- end
- end
- function getBlockUp( block )
- local succes, data = turtle.inspectUp()
- if succes then
- if data.name == block then
- return true
- else
- return false
- end
- else
- return false
- end
- end
- function getBlockDown( block )
- local succes, data = turtle.inspectDown()
- if succes then
- if data.name == block then
- return true
- else
- return false
- end
- else
- return false
- end
- end
- function BlockDown( block )
- local succes, data = turtle.inspectDown()
- if succes then
- return true
- else
- return false
- end
- end
- -- start
- turtle.select(1)
- -- loop
- while true do
- potato()
- seed()
- if getBlockMeta("minecraft:stone", 2) then
- turtle.turnLeft()
- slot9 = turtle.getItemDetail(9)
- if turtle.getFuelLevel() < 100 then
- if getBlock("minecraft:chest") then
- turtle.select(9)
- if slot9 == nil then
- turtle.suck()
- end
- turtle.refuel(2)
- turtle.select(1)
- end
- end
- turtle.turnLeft()
- end
- if getBlockMeta("minecraft:stone", 6) then
- turtle.turnLeft()
- if getBlock("minecraft:chest") then
- turtle.select(2)
- turtle.drop()
- turtle.select(1)
- end
- turtle.turnLeft()
- end
- if getBlock("minecraft:planks") then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- potato()
- seed()
- end
- if getBlock("minecraft:cobblestone") then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- potato()
- seed()
- end
- turtle.forward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement