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.

    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      FEET

      Represents an offset from the feet. This value solely returns the unmodified location.

      EYES

      Represents an offset from the eyes. This value requires an entity to be present.

    • 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.
      • Methods inherited from class kotlin.Enum

        getName, getOrdinal
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.