Advertisement
Bane_MC

Smarter Turtles v0.1a - Documentation

May 20th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.30 KB | None | 0 0
  1. turtle.up(n, afterEachMove, retryOnFail)
  2. Move the turtle up a specified number of times.
  3. Arguments:
  4. n : The number of steps to take [Default: 1]
  5. afterEachMove : The function to run after each step. Takes a "step" argument which is the current step from 1 to n. [Default: nil]
  6. retryOnFail : A flag indicating whether or not to retry the action until successful [Default: true]
  7. Usage:
  8. turtle.up([1-n* [, (function|nil) [, (true | false)]]])
  9. * where n is some number greater than 1 which will not take your turtle above the sky box
  10.  
  11. turtle.down(n, afterEachMove, retryOnFail)
  12. Move the turtle down a specified number of times.
  13. Arguments:
  14. n : The number of steps to take [Default: 1]
  15. afterEachMove : The function to run after each step. Takes a "step" argument which is the current step from 1 to n. [Default: nil]
  16. retryOnFail : A flag indicating whether or not to retry the action until successful [Default: true]
  17. Usage:
  18. turtle.down([1-n* [, (function|nil) [, (true | false)]]])
  19. * where n is some number greater than 1 which will not take your turtle below bedrock
  20.  
  21. turtle.back(n, afterEachMove, retryOnFail)
  22. Move the turtle back a specified number of times.
  23. Arguments:
  24. n : The number of steps to take [Default: 1]
  25. afterEachMove : The function to run after each step. Takes a "step" argument which is the current step from 1 to n. [Default: nil]
  26. retryOnFail : A flag indicating whether or not to retry the action until successful [Default: true]
  27. Usage:
  28. turtle.back([1-n* [, (function|nil) [, (true | false)]]])
  29. * where n is some number greater than 1 which will not take your turtle into an unloaded chunk
  30.  
  31. turtle.forward(n, afterEachMove, retryOnFail)
  32. Move the turtle forward a specified number of times.
  33. Arguments:
  34. n : The number of steps to take [Default: 1]
  35. afterEachMove : The function to run after each step. Takes a "step" argument which is the current step from 1 to n. [Default: nil]
  36. retryOnFail : A flag indicating whether or not to retry the action until successful [Default: true]
  37. Usage:
  38. turtle.forward([1-n* [, (function|nil) [, (true | false)]]])
  39. * where n is some number greater than 1 which will not take your turtle into an unloaded chunk
  40.  
  41. turtle.left(n, reorientAfterEachMove, reorientWhenDone, afterEachMove, retryOnFail)
  42. Move the turtle left a specified number of times. In order to move left, the turtle will first turn left, then start walking forwards.
  43. Arguments:
  44. n : The number of steps to take [Default: 1]
  45. reorientAfterEachMove : A flag indicating whether or not the turtle should face its original direction after each step. [Default: false]
  46. reorientWhenDone : A flag indicating whether or not the turtle should face its original direction when it has finished moving n times. Note, if reorientAfterEachMove is set to true, this value is ignored [Default: true]
  47. afterEachMove : The function to run after each step. Takes a "step" argument which is the current step from 1 to n. [Default: nil]
  48. retryOnFail : A flag indicating whether or not to retry the action until successful [Default: true]
  49. Usage:
  50. turtle.left([1-n* [, (true | false) [, (true | false) [, (function|nil) [, (true | false)]]]]])
  51. * where n is some number greater than 1 which will not take your turtle into an unloaded chunk
  52.  
  53. turtle.right(n, reorientAfterEachMove, reorientWhenDone, afterEachMove, retryOnFail)
  54. Move the turtle right a specified number of times. In order to move right, the turtle will first turn right, then start walking forwards.
  55. Arguments:
  56. n : The number of steps to take [Default: 1]
  57. reorientAfterEachMove : A flag indicating whether or not the turtle should face its original direction after each step. [Default: false]
  58. reorientWhenDone : A flag indicating whether or not the turtle should face its original direction when it has finished moving n times. Note, if reorientAfterEachMove is set to true, this value is ignored [Default: true]
  59. afterEachMove : The function to run after each step. Takes a "step" argument which is the current step from 1 to n. [Default: nil]
  60. retryOnFail : A flag indicating whether or not to retry the action until successful [Default: true]
  61. Usage:
  62. turtle.right([1-n* [, (true | false) [, (true | false) [, (function|nil) [, (true | false)]]]]])
  63. * where n is some number greater than 1 which will not take your turtle into an unloaded chunk
  64.  
  65. turtle.dig(n, afterEachDig, whenDone, retryOnFail)
  66. Digs forwards a specified number of times. When n is greater than 1, the turtle will move forward after each dig. The turtle will wait for and dig out any falling entities before moving forward. If no blocks are detected, the turtle will move forwards until it finds blocks to dig or until it reaches n.
  67. Arguments:
  68. n : The number of times to dig [Default: 1]
  69. afterEachDig : A function to run each time the turtle digs something up. If the turtle does not encounter a block and, instead, walks through empty space, this function is not called. Takes a "step" argument which is the current step from 1 to n. [Default: nil]
  70. whenDone : A function to run when the turtle has finished digging n times. Useful for getting the turtle to return to its original place. Takes a "steps" argument which is n. [Default: nil]
  71. retryOnFail : A flag indicating whether or not to retry the action until successful [Default: true]
  72. Usage:
  73. turtle.dig([1-n* [, (function | nil) [, (function|nil) [, (true | false)]]]])
  74. * where n is some number greater than 1 which will not take your turtle into an unloaded chunk
  75.  
  76. turtle.digUp(n, afterEachDig, whenDone, retryOnFail)
  77. Digs up a specified number of times. When n is greater than 1, the turtle will move up after each dig. The turtle will wait for and dig out any falling entities before moving up. If no blocks are detected, the turtle will move up until it finds blocks to dig or until it reaches n.
  78. Arguments:
  79. n : The number of times to dig [Default: 1]
  80. afterEachDig : A function to run each time the turtle digs something up. If the turtle does not encounter a block and, instead, walks through empty space, this function is not called. Takes a "step" argument which is the current step from 1 to n. [Default: nil]
  81. whenDone : A function to run when the turtle has finished digging n times. Useful for getting the turtle to return to its original place. Takes a "steps" argument which is n. [Default: nil]
  82. retryOnFail : A flag indicating whether or not to retry the action until successful [Default: true]
  83. Usage:
  84. turtle.digUp([1-n* [, (function | nil) [, (function|nil) [, (true | false)]]]])
  85. * where n is some number greater than 1 which will not take your turtle above the sky box
  86.  
  87. turtle.digDown(n, afterEachDig, whenDone, retryOnFail)
  88. Digs down a specified number of times. When n is greater than 1, the turtle will move down after each dig. If no blocks are detected, the turtle will move down until it finds blocks to dig or until it reaches n.
  89. Arguments:
  90. n : The number of times to dig [Default: 1]
  91. afterEachDig : A function to run each time the turtle digs something up. If the turtle does not encounter a block and, instead, walks through empty space, this function is not called. Takes a "step" argument which is the current step from 1 to n. [Default: nil]
  92. whenDone : A function to run when the turtle has finished digging n times. Useful for getting the turtle to return to its original place. Takes a "steps" argument which is n. [Default: nil]
  93. retryOnFail : A flag indicating whether or not to retry the action until successful [Default: true]
  94. Usage:
  95. turtle.digUp([1-n* [, (function | nil) [, (function|nil) [, (true | false)]]]])
  96. * where n is some number greater than 1 which will not take your turtle below bedrock
  97.  
  98. Note regarding retryOnFail: When enabled (enabled by default), if the turtle gets stuck for any reason (can't move, can't dig, etc) the program it is executing will pause and it will wait for assistance. An example of this can be seen in the YouTube teaser.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement