Request Need a certain code for Computercraft Turtles~

Shunraiki

New Member
Jul 29, 2019
78
0
0
Hai hai~
I'm kinda still learning how to computer program xD
I'd like to know what would be a simple code to make a turtle only mine a specific block and move forward till all blocks are mined and go back to their initial position..

Basically i'm looking for a code that auto-mines living stone and wood from Botania xD
 

JohnOC

New Member
Jul 29, 2019
39
0
0
To start with only mining the block below if it is livingwood or livingrock, write a pair of loops that make the turtle travel above the 3x3 outer path. Write a function that gets called after each move to check the block below for being the right block, mine it if it is the correct block.

Here's the wiki page for a turtle API function that makes the turtle report the block name of the block below it:
http://computercraft.info/wiki/Turtle.inspectDown

Now that turtles can change their equipped items, you could also make it select the correct tool to mine with after inspecting the block below.

And since inspecting also returns False if there is no block below, you can make it place a block into empty spaces around the daisy.