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.
    void
    globalMove(float x, float y, float z, float speedModifier)
     
    boolean
     
    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 up, float front, float speedModifier)
    Move the entity relative to its rotation.
    default 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
     
    void
    setVelocity(double x, double y, double z)
    Override the entity's velocity.
  • Method Details

    • move

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

      void globalMove(float x, float y, float z, float speedModifier)
    • 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

      default 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.
    • isInWater

      boolean isInWater()
    • 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.
    • queuePostTick

      void queuePostTick(Runnable runnable)