Contents
Class BoundingBox
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.component.BoundingBox
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
-
Field Summary
Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyRotation(float pitch, float yaw, float roll) Recomputes the bounding box as the enclosing AABB of the base model box rotated by the given Euler angles.clone()static ComponentType<EntityStore, BoundingBox> floatgetScale()voidsetBaseModelBox(Box baseModelBox) voidsetBoundingBox(Box boundingBox) voidsetDetailBoxes(Map<String, DetailBox[]> detailBoxes) voidsetScale(float scale) Scales the bounding box and the detail boxes around the entity origin.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Constructor Details
-
BoundingBox
public BoundingBox() -
BoundingBox
-
-
Method Details
-
getComponentType
-
getBoundingBox
-
setBoundingBox
-
setBaseModelBox
-
getScale
public float getScale() -
setScale
public void setScale(float scale) Scales the bounding box and the detail boxes around the entity origin.The scale survives the calls that recompute the box. A scaled entity keeps its scale when its model, its movement state or its rotation changes.
This method ignores a scale that is not finite or not larger than zero. Such a value makes the box empty or inverted. The scale reaches the server as persisted data or in a packet.
-
applyRotation
public void applyRotation(float pitch, float yaw, float roll) Recomputes the bounding box as the enclosing AABB of the base model box rotated by the given Euler angles. No-op if no base model box is stored. -
getDetailBoxes
-
setDetailBoxes
-
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-