Class FlyingNodeFollower

java.lang.Object
net.minestom.server.entity.pathfinding.followers.FlyingNodeFollower
All Implemented Interfaces:
NodeFollower

public class FlyingNodeFollower extends Object implements NodeFollower
  • Constructor Summary

    Constructors
    Constructor
    Description
    FlyingNodeFollower(@NotNull Entity entity)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isAtPoint(@NotNull Point point)
    Check if the follower is at the specified point
    void
    jump(@Nullable Point point, @Nullable Point target)
    Jump
    double
    Get the movement speed of the follower
    void
    moveTowards(@NotNull Point direction, double speed, @NotNull Point lookAt)
    Used to move the entity toward direction in the X and Z axis Gravity is still applied but the entity will not attempt to jump Also update the yaw/pitch of the entity to look along 'direction'

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FlyingNodeFollower

      public FlyingNodeFollower(@NotNull @NotNull Entity entity)
  • Method Details

    • moveTowards

      public void moveTowards(@NotNull @NotNull Point direction, double speed, @NotNull @NotNull Point lookAt)
      Used to move the entity toward direction in the X and Z axis Gravity is still applied but the entity will not attempt to jump Also update the yaw/pitch of the entity to look along 'direction'
      Specified by:
      moveTowards in interface NodeFollower
      Parameters:
      direction - the targeted position
      speed - define how far the entity will move
      lookAt - the point to look at
    • jump

      public void jump(@Nullable @Nullable Point point, @Nullable @Nullable Point target)
      Description copied from interface: NodeFollower
      Jump
      Specified by:
      jump in interface NodeFollower
    • isAtPoint

      public boolean isAtPoint(@NotNull @NotNull Point point)
      Description copied from interface: NodeFollower
      Check if the follower is at the specified point
      Specified by:
      isAtPoint in interface NodeFollower
      Parameters:
      point - the point to check
      Returns:
      true if the follower is at the point
    • movementSpeed

      public double movementSpeed()
      Description copied from interface: NodeFollower
      Get the movement speed of the follower
      Specified by:
      movementSpeed in interface NodeFollower
      Returns:
      the movement speed