Enum Class TurtleAnimation

java.lang.Object
java.lang.Enum<TurtleAnimation>
dan200.computercraft.api.turtle.TurtleAnimation
All Implemented Interfaces:
Serializable, Comparable<TurtleAnimation>, Constable

public enum TurtleAnimation extends Enum<TurtleAnimation>
An animation a turtle will play between executing commands.

Each animation takes 8 ticks to complete unless otherwise specified.

See Also:
  • Enum Constant Details

    • NONE

      public static final TurtleAnimation NONE
      An animation which does nothing. This takes no time to complete.
      See Also:
    • MOVE_FORWARD

      public static final TurtleAnimation MOVE_FORWARD
      Make the turtle move forward. Note that the animation starts from the block behind it, and moves into this one.
    • MOVE_BACK

      public static final TurtleAnimation 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

      public static final TurtleAnimation MOVE_UP
      Make the turtle move backwards. Note that the animation starts from the block above it, and moves into this one.
    • MOVE_DOWN

      public static final TurtleAnimation MOVE_DOWN
      Make the turtle move backwards. Note that the animation starts from the block below it, and moves into this one.
    • TURN_LEFT

      public static final TurtleAnimation 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

      public static final TurtleAnimation 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

      public static final TurtleAnimation SWING_LEFT_TOOL
      Swing the tool on the left.
    • SWING_RIGHT_TOOL

      public static final TurtleAnimation SWING_RIGHT_TOOL
      Swing the tool on the right.
    • WAIT

      public static final TurtleAnimation WAIT
      Wait until the animation has finished, performing no movement.
      See Also:
    • SHORT_WAIT

      public static final TurtleAnimation SHORT_WAIT
      Wait until the animation has finished, performing no movement. This takes 4 ticks to complete.
      See Also:
  • Method Details

    • values

      public static TurtleAnimation[] 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

      public static TurtleAnimation valueOf(String name)
      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 name
      NullPointerException - if the argument is null