Class FlyingNodeFollower
java.lang.Object
net.minestom.server.entity.pathfinding.followers.FlyingNodeFollower
- All Implemented Interfaces:
NodeFollower
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAtPoint(@NotNull net.minestom.server.coordinate.Point point) Check if the follower is at the specified pointvoidjump(@Nullable net.minestom.server.coordinate.Point point, @Nullable net.minestom.server.coordinate.Point target) JumpdoubleGet the movement speed of the followervoidmoveTowards(@NotNull net.minestom.server.coordinate.Point direction, double speed, @NotNull net.minestom.server.coordinate.Point lookAt) Used to move the entity towarddirectionin 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'
-
Constructor Details
-
FlyingNodeFollower
-
-
Method Details
-
moveTowards
public void moveTowards(@NotNull @NotNull net.minestom.server.coordinate.Point direction, double speed, @NotNull @NotNull net.minestom.server.coordinate.Point lookAt) Used to move the entity towarddirectionin 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:
moveTowardsin interfaceNodeFollower- Parameters:
direction- the targeted positionspeed- define how far the entity will movelookAt- the point to look at
-
jump
public void jump(@Nullable @Nullable net.minestom.server.coordinate.Point point, @Nullable @Nullable net.minestom.server.coordinate.Point target) Description copied from interface:NodeFollowerJump- Specified by:
jumpin interfaceNodeFollower
-
isAtPoint
public boolean isAtPoint(@NotNull @NotNull net.minestom.server.coordinate.Point point) Description copied from interface:NodeFollowerCheck if the follower is at the specified point- Specified by:
isAtPointin interfaceNodeFollower- Parameters:
point- the point to check- Returns:
- true if the follower is at the point
-
movementSpeed
public double movementSpeed()Description copied from interface:NodeFollowerGet the movement speed of the follower- Specified by:
movementSpeedin interfaceNodeFollower- Returns:
- the movement speed
-