Ledger Nano X - The secure hardware wallet
SHARE
TWEET

mine.lua

a guest Apr 7th, 2020 147 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function digF()
  2.     while(turtle.detect())
  3.     do
  4.         turtle.dig()
  5.     end
  6.     turtle.forward()
  7. end
  8.  
  9. function digU()
  10.     while(turtle.detectUp())
  11.     do  
  12.         turtle.digUp()
  13.     end
  14.     turtle.up()
  15. end
  16.  
  17. function corr(length)
  18.     for i=1,length do
  19.         digF()
  20.         turtle.digDown()
  21.         turtle.digUp()
  22.     end
  23. end
  24.  
  25. function dropStone()
  26.     for i=1,16 do
  27.         if turtle.getItemCount(i) > 0 then
  28.             if turtle.getItemDetail(i).name == "minecraft:cobblestone" then
  29.                 turtle.select(i)
  30.                 turtle.drop(turtle.getItemCount(i))
  31.             end
  32.         end
  33.     end
  34. end
  35.  
  36. function dropEverything()
  37.     for i=1, 16 do
  38.         if turtle.getItemCount(i) > 0 then
  39.             turtle.select(i)
  40.             turtle.drop(turtle.getItemCount(i))
  41.         end
  42.     end
  43. end
  44.  
  45. function strip(length, width, level)
  46.     for i=1, 3*level do
  47.         digU()
  48.     end
  49.     for i=1, width do
  50.         corr(length)
  51.         turtle.turnLeft()
  52.         digF()
  53.         turtle.digUp()
  54.         turtle.digDown()
  55.         turtle.turnLeft()
  56.         corr(length)
  57.         -- spullen droppen
  58.         turtle.turnLeft()
  59.         for k=1, 2*i-1 do
  60.             turtle.forward()
  61.         end
  62.         for k=1, 3*level do
  63.             turtle.down()
  64.         end
  65.         dropStone()
  66.         turtle.turnRight()
  67.         turtle.forward()
  68.         turtle.turnLeft()
  69.         dropEverything()
  70.         turtle.turnLeft()
  71.         turtle.forward()
  72.         turtle.turnLeft()
  73.         for k=1, 3*level do
  74.             turtle.up()
  75.         end
  76.         for k=1, 2*i-1 do
  77.             turtle.forward()
  78.         end
  79.         digF()
  80.         turtle.digUp()
  81.         turtle.digDown()
  82.         turtle.turnRight()
  83.     end
  84.     turtle.turnRight()
  85.     for k=1,2*width do
  86.         turtle.forward()
  87.     end
  88.     turtle.turnLeft()
  89.     for k=1,3*level do
  90.         turtle.down()
  91.     end
  92. end
  93.  
  94. function staircase(depth)
  95.     for i=1,depth do
  96.         turtle.digDown()
  97.         turtle.down()
  98.         for j=1,3 do
  99.             digF()
  100.         end
  101.         turtle.turnLeft()
  102.         digF()
  103.         turtle.turnLeft()
  104.         for j=1,3 do
  105.             digF()
  106.         end
  107.         turtle.turnLeft()
  108.         turtle.forward()
  109.         turtle.turnLeft()
  110.         turtle.forward()
  111.     end
  112. end
  113.  
  114. --staircase(3)
  115.  
  116. strip(10, 10, 0)
  117. strip(10, 10, 1)
  118. --strip(3, 3, 0)
  119. --dropStone()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top