Package dan200.computercraft.api.turtle
Enum Class TurtleUpgradeType
- All Implemented Interfaces:
Serializable
,Comparable<TurtleUpgradeType>
,Constable
An enum representing the different types of turtle that an
ITurtleUpgrade
implementation can add to a turtle.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAn upgrade which provides both a tool and a peripheral.A peripheral adds a special peripheral which is attached to the side of the turtle, and can be interacted with theperipheral
API (Such as the modem on Wireless Turtles).A tool is rendered as an item on the side of the turtle, and responds to theturtle.dig()
andturtle.attack()
methods (Such as pickaxe or sword on Mining and Melee turtles). -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
isTool()
static TurtleUpgradeType
Returns the enum constant of this class with the specified name.static TurtleUpgradeType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TOOL
A tool is rendered as an item on the side of the turtle, and responds to theturtle.dig()
andturtle.attack()
methods (Such as pickaxe or sword on Mining and Melee turtles). -
PERIPHERAL
A peripheral adds a special peripheral which is attached to the side of the turtle, and can be interacted with theperipheral
API (Such as the modem on Wireless Turtles). -
BOTH
An upgrade which provides both a tool and a peripheral. This can be used when you wish your upgrade to also provide methods. For example, a pickaxe could provide methods determining whether it can break the given block or not.
-
-
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
-
isTool
public boolean isTool() -
isPeripheral
public boolean isPeripheral()
-