Interface MoveController

All Known Implementing Classes:
EmptyMoveController

public interface MoveController
Wrapper interface for controlling the movement of a living entity.
This will not work on entities with no AI. Use LivingEntity.hasAI() to check.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addVelocity(double x, double y, double z)
    Add velocity to the entity.
    float
    Get the value of the movement speed attribute of this entity.
    org.bukkit.util.Vector
    Get the current velocity of this entity.
    boolean
    Get the true ground state of this entity.
    This is necessary since the default ground state obtain through Entity.isOnGround() is forcefully set to true to maintain consistent movement speed.
    void
    Cause the entity to jump.
    void
    move(float side, float front, float speed)
    Move the entity relative to its rotation.
    void
    movePassenger(org.bukkit.entity.Entity entity, double x, double y, double z)
    Synced method for moving a rider of this entity to the correct location
    void
    Reset fall distance of this entity.
    This is used to stop the entity from taking fall damage.
    void
    setVelocity(double x, double y, double z)
    Override the entity's velocity.
  • Method Details

    • move

      void move(float side, float front, float speed)
      Move the entity relative to its rotation.
      Parameters:
      side - side step strength
      front - forward step strength
      speed - speed multiplier
    • jump

      void jump()
      Cause the entity to jump.
    • setVelocity

      void setVelocity(double x, double y, double z)
      Override the entity's velocity.
      Parameters:
      x - x velocity in world space
      y - y velocity in world space
      z - z velocity in world space
    • addVelocity

      void addVelocity(double x, double y, double z)
      Add velocity to the entity.
      Parameters:
      x - x velocity in world space
      y - y velocity in world space
      z - z velocity in world space
    • nullifyFallDistance

      void nullifyFallDistance()
      Reset fall distance of this entity.
      This is used to stop the entity from taking fall damage.
    • movePassenger

      void movePassenger(org.bukkit.entity.Entity entity, double x, double y, double z)
      Synced method for moving a rider of this entity to the correct location
      Parameters:
      entity - rider on this entity
      x - x coordinate
      y - y coordinate
      z - z coordinate
    • isOnGround

      boolean isOnGround()
      Get the true ground state of this entity.
      This is necessary since the default ground state obtain through Entity.isOnGround() is forcefully set to true to maintain consistent movement speed.
    • getSpeed

      float getSpeed()
      Get the value of the movement speed attribute of this entity.
    • getVelocity

      org.bukkit.util.Vector getVelocity()
      Get the current velocity of this entity.