Enum Class FarmerResult
- All Implemented Interfaces:
Serializable,Comparable<FarmerResult>,Constable
Return values for IFarmerBehavior, each one has a different meaning in harvest and planting contexts.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that your behavior failed to perform the action it attempted.Indicates you want the farmer to halt all further actions this tick.Indicates that your behavior succeeded doing the action it attempted. -
Method Summary
Modifier and TypeMethodDescriptionstatic FarmerResultReturns the enum constant of this class with the specified name.static FarmerResult[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FAIL
Indicates that your behavior failed to perform the action it attempted. -
SUCCESS
Indicates that your behavior succeeded doing the action it attempted. For harvesting, this also shrinks the current stack by one, and stops processing. -
STOP_PROCESSING
Indicates you want the farmer to halt all further actions this tick. This will exit the farmer behavior loop if returned.
-
-
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
-