Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
games:minecraft:public:computer_craft:notable_turtle_programs [2023/03/05 01:15] – clay | games:minecraft:public:computer_craft:notable_turtle_programs [2023/03/13 16:31] (current) – clay | ||
---|---|---|---|
Line 13: | Line 13: | ||
updated fork = https:// | updated fork = https:// | ||
+ | |||
+ | another fork = https:// | ||
---- | ---- | ||
Line 240: | Line 242: | ||
Here's how the updated script works: | 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' | + | * |
- | * 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' | + | * |
===== Other ===== | ===== Other ===== | ||