Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function startCheck()
- if (turtle.getFuelLevel() < 50) then
- getFuel()
- end
- turtle.select(1)
- end
- function fishCheck()
- turtle.suck()
- if ( turtle.compareTo(2) and turtle.getItemCount(1) == 64) then
- return true
- else
- turtle.drop() -- put wrong item/amount back into chest
- return false
- end
- end
- function getCookedFish()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.drop() -- dropped cooked fish in furnace chest
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- getFish() -- get fish from cooked chest
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.drop() -- drop cooked fish into chest
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- end
- function getFish()
- turtle.suck()
- if (turtle.getItemCount(1) < 64) then
- while ( turtle.getItemCount(1) < 64) do
- turtle.drop()
- sleep(5)
- turtle.suck()
- end
- end
- end
- function getFuel()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.select(16) -- select 16th slot to handle coal in
- while (turtle.getFuelLevel < 50) do -- Keep grabbing and consuming fuel until filled
- turtle.suck()
- turtle.refuel()
- if (turtle.getItemCount(16) > 0) then
- turtle.drop() -- if there is any left over coal, drop it back in chest
- end
- end
- turtle.select(1) -- back to default slot
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- end
- function main()
- startCheck() -- check everything is g (fuel)
- if(fishCheck()) then -- if it is raw fish, and the right amount
- getCookedFish() -- move between all the chest and provide cooked fish!
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement