Explosive Turtle - KnightMiner/KnightPeripherals GitHub Wiki
The explosive turtle is a turtle upgrade added by KnightPeripherals. It can be used to automatically cause explosions, similarly to a minecart with TNT.
Recipe
To create an explosive turtle, simply craft a turtle with TNT.
Usage
In order to use any of the functions, the turtle must first be wrapped using peripheral.wrap( String side )
. The wrapped peripheral exposes several functions.
Bomb
The bomb functions can be used to place TNT from the turtle's inventory. The TNT when it explodes will trigger a player kill. Note that the TNT is powerful enough to destroy the turtle, unless it is an advanced turtle in the 1.8 version of ComputerCraft or later. The following functions for bombing are available:
bomb()
: Places TNT in front of the turtlebombUp()
: Places TNT above the turtlebombDown()
: Places TNT below the turtle
Result
If successful, the turtle will wait about 1 tick and return true
.
If the function cannot place TNT, it will return false
plus one of the following reasons:
Block at location
: There is a block at the target, the turtle can only place TNT into air or liquids.No TNT found in slot
: The selected slot does not contain TNT.
Explode
The explode function causes the turtle to blow up, destroying itself. The explosion will trigger player kills. The following explode function is available:
explode()
: Blows up the turtle after a short delay
Result
Upon success, the turtle returns true
, though since it blew up you will never get the message. The function cannot fail in any way currently.