Advertisement
Machuga14

Botania HarvestLivingRock

Jun 5th, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. function placeStone() -- Place stone in front of the turtle bot
  2.   for i = 1, 16, 1 do
  3.     turtle.select(i)
  4.     block = turtle.getItemDetail()
  5.    
  6.     if block and (block["name"] == "minecraft:stone" or block["name"] == "minecraft:log") then
  7.       turtle.place()
  8.     end
  9.   end
  10. end
  11.  
  12. while true do
  13.   while not turtle.detect() do
  14.     placeStone()
  15.     os.sleep(5)
  16.   end
  17.  
  18.   success, block = turtle.inspect()
  19.   if success then
  20.     write("found: "..block.name.."\r\n")
  21.       if block.name == "Botania:livingrock" or block.name == "Botania:livingwood" then
  22.         turtle.dig()
  23.       end
  24.   end
  25.     os.sleep(5)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement