Enum EntityAnchor
-
- All Implemented Interfaces:
-
java.io.Serializable
,kotlin.Comparable
public enum EntityAnchor extends Enum<EntityAnchor>
An enum that has two possible values: FEET and EYES. This argument is used to calculate the offset of a location as if from at the feet or eyes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
EntityAnchor.Companion
-
Field Summary
Fields Modifier and Type Field Description private final String
anchorName
private final String
name
private final Integer
ordinal
private final EnumEntries<EntityAnchor>
entries
-
Method Summary
Modifier and Type Method Description final Location
apply(LivingEntity entity)
Returns the location of the entity with the respective offset. final Location
apply(Location location, LivingEntity entity)
Returns the location and possibly the entity with the respective offset. final EntityAnchor
valueOf(String value)
Returns the enum constant of this type with the specified name. final Array<EntityAnchor>
values()
Returns an array containing the constants of this enum type, in the order they're declared. final String
getAnchorName()
final EnumEntries<EntityAnchor>
getEntries()
An enum that has two possible values: FEET and EYES. -
-
Method Detail
-
apply
final Location apply(LivingEntity entity)
Returns the location of the entity with the respective offset.
-
apply
final Location apply(Location location, LivingEntity entity)
Returns the location and possibly the entity with the respective offset. The entity can be null, but only if it calculates from the feet, otherwise throws an IllegalArgumentException.
-
valueOf
final EntityAnchor valueOf(String value)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
- Parameters:
value
- The name of the anchor as if used in an argument.
-
values
final Array<EntityAnchor> values()
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
-
getAnchorName
final String getAnchorName()
-
getEntries
final EnumEntries<EntityAnchor> getEntries()
An enum that has two possible values: FEET and EYES. This argument is used to calculate the offset of a location as if from at the feet or eyes.
-
-
-
-