Sensor Turtle - KnightMiner/KnightPeripherals GitHub Wiki
The sensor turtle is a turtle upgrade added by KnightPeripherals. It can be used to determine information about the world around the turtle.
Recipe
To create a sensor turtle, simply craft a turtle with a turtle claw. A turtle claw can be crafted as follows:
Usage
In order to use the sensor function, the turtle must first be wrapped using peripheral.wrap( String side )
. The wrapped peripheral exposes the following functions:
getRange()
: Returns the maximum range for the sensor.sonar( [ Number range ] )
: Fires the sonar in front of the turtle.sonarUp( [ Number range ] )
: Fires the sonar above of the turtle.sonarDown( [ Number range ] )
: Fires the sonar below of the turtle.density( [ Number range ] )
: Fires the density scanner in front of the turtle.densityUp( [ Number range ] )
: Fires the density scanner above of the turtle.densityDown( [ Number range ] )
: Fires the density scanner below of the turtle.
For most commands, the parameter range
is included to determine the maximum range for the sensor. This can not be bigger than the maximum range from the config file, which is also the default if unset.
Sonar result
The sonar will return the distance to the nearest block or entity. Note that liquids slow down the sonar causing it to seem like a 2 block distance.
Density result
The density scanner feature will scan the blocks in the range and get a number of the total density of the blocks. The density is equivalent to the squared hardness of the block (or 1,000,000 for unbreakable blocks).
The density scanner is quite slow and will take 1 tick per block scanned to function.