Package me.deecaad.core.utils
Class EntityTransform
java.lang.Object
me.deecaad.core.utils.Transform
me.deecaad.core.utils.EntityTransform
- All Implemented Interfaces:
TransformLike
Wraps a bukkit
Entity as a Transform. Entity transforms cannot have a parent, but
they can have children. This transform tries to follow the attached entity as close as possible.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyRotation(org.joml.Quaterniond rotation) org.bukkit.util.Vectororg.joml.QuaterniondvoidsetLocalPosition(org.bukkit.util.Vector localPosition) voidsetLocalRotation(org.joml.Quaterniond localRotation) voidsetParent(TransformLike parent) voidupdate()Called once per tick by a ticking system (e.g.Methods inherited from class me.deecaad.core.utils.Transform
addChild, fromYawPitch, getChild, getChildren, getForward, getPosition, getRight, getRotation, getTransform, getUp, lookAt, pitch, propagate, removeChild, rotate, set, setForward, setPosition, setPosition, setRight, setRotation, setUp, tick, yawMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.deecaad.core.utils.TransformLike
applyTransform
-
Constructor Details
-
EntityTransform
public EntityTransform(org.bukkit.entity.Entity entity)
-
-
Method Details
-
update
public void update()Description copied from interface:TransformLikeCalled once per tick by a ticking system (e.g.me.deecaad.core.tick.TickManagerviaTransformTree). Dynamic transforms (ones that track an external source or animate over time) override this to recompute their local transform and propagate the change to children. Implementations must not restructure the tree from here. -
getParent
-
setParent
-
getLocalPosition
public org.bukkit.util.Vector getLocalPosition()- Overrides:
getLocalPositionin classTransform
-
setLocalPosition
public void setLocalPosition(org.bukkit.util.Vector localPosition) - Overrides:
setLocalPositionin classTransform
-
getLocalRotation
public org.joml.Quaterniond getLocalRotation()- Overrides:
getLocalRotationin classTransform
-
setLocalRotation
public void setLocalRotation(org.joml.Quaterniond localRotation) - Overrides:
setLocalRotationin classTransform
-
applyRotation
public void applyRotation(org.joml.Quaterniond rotation) - Overrides:
applyRotationin classTransform
-