Advertisement
CrispyPin

platform.lua

Sep 19th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. turtle.refuel()
  2.  
  3. function replace()
  4.     turtle.digDown()
  5.     item = turtle.getItemDetail()
  6.     if item ~= nil then
  7.         if item.name ~= "minecraft:stone" or item.damage ~= 5 then
  8.             turtle.select(turtle.getSelectedSlot()+1)
  9.         end
  10.     else
  11.         turtle.select(turtle.getSelectedSlot()+1)
  12.     end
  13.     turtle.placeDown()
  14. end
  15.  
  16. for x = 1, 12 do
  17.     for y = 1, 12 do
  18.         a, b = turtle.inspectDown()
  19.         if a then
  20.             if b.state.variant ~= "andesite" then
  21.                 replace()
  22.             end
  23.         else
  24.             replace()
  25.         end
  26.         turtle.forward()
  27.     end
  28.     if x % 2 == 1 then
  29.         turtle.turnRight()
  30.         turtle.forward()
  31.         turtle.turnRight()
  32.     else
  33.         turtle.turnLeft()
  34.         turtle.forward()
  35.         turtle.turnLeft()
  36.     end
  37.     turtle.forward()
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement