Package me.gamercoder215.mobchip.combat
Enum Class CombatLocation
- All Implemented Interfaces:
Serializable
,Comparable<CombatLocation>
,Constable
,Keyed
Represents a specific location in combat that a Mob can prepare for.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents when the Mob takes damage because of a ladder.Represents when the Mob takes damage because of another falling incident.Represents when the Mob takes damage because of scaffolding.Represents when the Mob takes damage because of twisting vines.Represents when the Mob takes damage because of falling from vines.Represents when the Mob takes damage because of water.Represents when the Mob takes damage because of weeping vines. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable CombatLocation
Fetches a CombatLocation by its NamespacedKey.getKey()
Fetches the key of this CombatLocation.static CombatLocation
Returns the enum constant of this class with the specified name.static CombatLocation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VINES
Represents when the Mob takes damage because of falling from vines. -
SCAFFOLDING
Represents when the Mob takes damage because of scaffolding. -
OTHER_CLIMBABLE
Represents when the Mob takes damage because of another falling incident. -
TWISTING_VINES
Represents when the Mob takes damage because of twisting vines. -
WEEPING_VINES
Represents when the Mob takes damage because of weeping vines. -
LADDER
Represents when the Mob takes damage because of a ladder. -
WATER
Represents when the Mob takes damage because of water.
-
-
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
-
getKey
Fetches the key of this CombatLocation. -
getByKey
Fetches a CombatLocation by its NamespacedKey.- Parameters:
key
- NamespacedKey of the CombatLocation to fetch- Returns:
- CombatLocation with the given NamespacedKey, or null if none exists
-