Class EntityTransform

java.lang.Object
me.deecaad.core.utils.Transform
me.deecaad.core.utils.EntityTransform
All Implemented Interfaces:
TransformLike

public class EntityTransform extends Transform
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 Details

    • EntityTransform

      public EntityTransform(org.bukkit.entity.Entity entity)
  • Method Details

    • update

      public void update()
      Description copied from interface: TransformLike
      Called once per tick by a ticking system (e.g. me.deecaad.core.tick.TickManager via TransformTree). 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

      public TransformLike getParent()
      Overrides:
      getParent in class Transform
    • setParent

      public void setParent(TransformLike parent)
      Overrides:
      setParent in class Transform
    • getLocalPosition

      public org.bukkit.util.Vector getLocalPosition()
      Overrides:
      getLocalPosition in class Transform
    • setLocalPosition

      public void setLocalPosition(org.bukkit.util.Vector localPosition)
      Overrides:
      setLocalPosition in class Transform
    • getLocalRotation

      public org.joml.Quaterniond getLocalRotation()
      Overrides:
      getLocalRotation in class Transform
    • setLocalRotation

      public void setLocalRotation(org.joml.Quaterniond localRotation)
      Overrides:
      setLocalRotation in class Transform
    • applyRotation

      public void applyRotation(org.joml.Quaterniond rotation)
      Overrides:
      applyRotation in class Transform