games:minecraft:public:computer_craft:notable_turtle_programs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
games:minecraft:public:computer_craft:notable_turtle_programs [2023/03/05 01:14] claygames:minecraft:public:computer_craft:notable_turtle_programs [2023/03/13 16:31] (current) clay
Line 13: Line 13:
  
 updated fork = https://github.com/Baynar/quarry updated fork = https://github.com/Baynar/quarry
 +
 +another fork = https://github.com/jeong-jaegyu/quarry
  
 ---- ----
Line 238: Line 240:
 end end
 </code> </code>
 +Here's how the updated script works:
  
 +  *     The script defines a new returnToStart() function that the turtle will use to return to its starting point, drop off its items, and pull a stack of coal from a chest.
 +  *     Inside the dig out a layer of the mine loop, the script checks whether the turtle's inventory is full using the getItemCount() function. If the turtle's inventory is full, it calls the returnToStart() function to return to the starting point and drop off its items.
 +  *     After the mining is complete, the script calls the returnToStart() function again to drop off any remaining items.
 +  *     Inside the returnToStart() function, the turtle first turns around to face the starting point, then moves back to the starting point using a for loop. It then uses another for loop to drop off all items in its inventory.
 +  *     Finally, the returnToStart() function selects the first slot in the turtle's inventory (assumed to contain coal) and uses the suck() function to pull a stack of 64 coal from a chest.
  
 ===== Other ===== ===== Other =====
  
  
  • games/minecraft/public/computer_craft/notable_turtle_programs.1677978870.txt.gz
  • Last modified: 2023/03/05 01:14
  • by clay