Clicking Turtle - KnightMiner/KnightPeripherals GitHub Wiki
The clicking turtle is a turtle upgrade added by KnightPeripherals. It can be used to automatically right click blocks.
Recipe
To create a clicking turtle, simply craft a turtle with a turtle claw. A turtle claw can be crafted as follows:
Usage
In order to use the clicking function, the turtle must first be wrapped using peripheral.wrap( String side )
. The wrapped peripheral exposes the following functions:
getClickDelay()
: Returns the delay for clicking from the config, this is mainly if something requires time sensitive clickingclick( [ Boolean sneak ] )
: Right clicks the block in front of the turtleclickUp( [ Boolean sneak ] )
: Right clicks the block above the turtleclickDown( [ Boolean sneak ] )
: Right clicks the block below the turtle
For click commands, the parameter sneak
determines whether the turtle should be sneaking. It defaults to false
. In addition, there will be a short delay after clicking to prevent abuse.
Fuel
A fuel cost can be set in the config to make the turtle require fuel to right click. By default, it requires no fuel.
Result
If successful, the turtle will wait about 1 tick and return true
plus an additional "clicked" Boolean. "clicked" will be true
if the block could actually be clicked, and false if it could not; though note that some mode added blocks will incorrectly return false
when they are clicked (such as Tinkers' Construct Oreberries).
If the function cannot right click, it will return false
plus one of the following reasons:
No block at target
: The target block is air, the clicking turtle can only right click blocks.Not enough fuel
: A fuel cost was enabled in the config, and the turtle does not have enough fuel to right click.Click event canceled
: Another mod canceled the click. The mod may be blocking clicks at this area, or is doing another function.