Mob Pathfinding API
Adds an API to allow plugins to instruct a Mob to Pathfind to a Location or Entity This does not do anything to stop other AI rules from changing the location, so it is still up to the plugin to control that or override after another goal changed the location. You can use EntityPathfindEvent to cancel new pathfinds from overriding your current.
This commit is contained in:
@@ -2,6 +2,7 @@ package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.loot.Lootable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
@@ -12,6 +13,13 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
// Paper start
|
||||
@Override
|
||||
org.bukkit.inventory.@org.jetbrains.annotations.NotNull EntityEquipment getEquipment();
|
||||
|
||||
/**
|
||||
* Enables access to control the pathing of an Entity
|
||||
* @return Pathfinding Manager for this entity
|
||||
*/
|
||||
@NotNull
|
||||
com.destroystokyo.paper.entity.Pathfinder getPathfinder();
|
||||
// Paper end
|
||||
/**
|
||||
* Instructs this Mob to set the specified LivingEntity as its target.
|
||||
|
||||
Reference in New Issue
Block a user