Package dan200.computercraft.api.turtle
Enum Class TurtleAnimation
- All Implemented Interfaces:
Serializable
,Comparable<TurtleAnimation>
,Constable
An animation a turtle will play between executing commands.
Each animation takes 8 ticks to complete unless otherwise specified.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMake the turtle move backwards.Make the turtle move backwards.Make the turtle move forward.Make the turtle move backwards.An animation which does nothing.Wait until the animation has finished, performing no movement.Swing the tool on the left.Swing the tool on the right.Turn the turtle to the left.Turn the turtle to the left.Wait until the animation has finished, performing no movement. -
Method Summary
Modifier and TypeMethodDescriptionstatic TurtleAnimation
Returns the enum constant of this class with the specified name.static TurtleAnimation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
An animation which does nothing. This takes no time to complete.- See Also:
-
MOVE_FORWARD
Make the turtle move forward. Note that the animation starts from the block behind it, and moves into this one. -
MOVE_BACK
Make the turtle move backwards. Note that the animation starts from the block in front it, and moves into this one. -
MOVE_UP
Make the turtle move backwards. Note that the animation starts from the block above it, and moves into this one. -
MOVE_DOWN
Make the turtle move backwards. Note that the animation starts from the block below it, and moves into this one. -
TURN_LEFT
Turn the turtle to the left. Note that the animation starts with the turtle facing right, and the turtle turns to face in the current direction. -
TURN_RIGHT
Turn the turtle to the left. Note that the animation starts with the turtle facing right, and the turtle turns to face in the current direction. -
SWING_LEFT_TOOL
Swing the tool on the left. -
SWING_RIGHT_TOOL
Swing the tool on the right. -
WAIT
Wait until the animation has finished, performing no movement.- See Also:
-
SHORT_WAIT
Wait until the animation has finished, performing no movement. This takes 4 ticks to complete.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-