Enum Class EntityPivotType
- All Implemented Interfaces:
Serializable,Comparable<EntityPivotType>,Constable
The
EntityPivotType enum defines the types of pivot points that can be used for entities within the game. A pivot point determines the
reference point for positioning and rotating entities.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents the center of the entity's collision box.Represents the center of the entity's dimensions.Represents the entity's current location, defined as its top left corner.Represents a distribution or spread of entities or effects over the entire bounding box of the reference entity. -
Method Summary
Modifier and TypeMethodDescriptionstatic EntityPivotTypeReturns the enum constant of this class with the specified name.static EntityPivotType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COLLISIONBOX_CENTER
Represents the center of the entity's collision box. This pivot type is useful for entities where interactions or collisions are centered around the entity's collision box rather than its entity dimensions. -
DIMENSION_CENTER
Represents the center of the entity's dimensions. This is commonly used for graphical alignment, ensuring that rotations or scaling operations are centered on the visual representation of the entity. -
LOCATION
Represents the entity's current location, defined as its top left corner. This pivot type is typically used for simple positioning where the reference object has the same dimensions as the reference entity. -
SPREAD
Represents a distribution or spread of entities or effects over the entire bounding box of the reference entity. This pivot type can be used for scenarios where an entity's effect or presence needs to be distributed across an area, rather than focused on a single point. For example, it could be used for area-of-effect spells, explosions, or spreading Props or Creatures in a game environment.
-
-
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
-