Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Farming script V2 by Mathias
- -- Variables
- crop = "wheat"
- seed = "wheat_seeds"
- function check()
- if (turtle.inspectDown()) then
- local block, type = turtle.inspectDown()
- type.name = type.name:gsub("minecraft:","")
- return type
- else
- local type = {name = "empty",metadata = 0}
- return type
- end
- print(block.name)
- end
- function plant()
- for i = 1,16 do
- if (turtle.getItemDetail(i)) then
- local data = turtle.getItemDetail(i)
- data.name = data.name:gsub("minecraft:","")
- if (data.name == seed) then
- turtle.select(i)
- turtle.placeDown()
- break
- end
- end
- end
- end
- plant()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement