wanderBackToPoint
public abstract AbstractWanderBackToPoint wanderBackToPoint(LivingEntity livingEntity, Location blockLocation, double maximumDistanceFromPoint, int maxDurationTicks, OverridableWanderPriority overridableWanderPriority)
@Nullable()
Makes a mob wander back to a point when it reaches a certain distance from that point, acting as a leash. Please note that not all mobs in minecraft are able to pathfind - mobs like slimes can't. This leash can be set to teleport them back, but if they're not set to teleport and they are set to walk back they will be unable to do anything. Pathfinding entities should extend Creature from the Spigot API. Non-creature entities are only allowable here under the assumption that they will be set to teleport.
Return
The instance of the WanderBackToPoint. Can be used in a builder pattern!
Parameters
livingEntity
Entity to leash
blockLocation
Location to leash to
maximumDistanceFromPoint
Maximum distance before the leash is applied
maxDurationTicks
Maximum duration of the navigation resulting form the leash