mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-29 23:17:59 +02:00
EntityCreature scheduling priority for pathfinding can now be modified
This commit is contained in:
parent
8ae82a81a1
commit
80d899a53a
@ -1,6 +1,7 @@
|
|||||||
package net.minestom.server.entity;
|
package net.minestom.server.entity;
|
||||||
|
|
||||||
import com.extollit.gaming.ai.path.HydrazinePathFinder;
|
import com.extollit.gaming.ai.path.HydrazinePathFinder;
|
||||||
|
import com.extollit.gaming.ai.path.SchedulingPriority;
|
||||||
import com.extollit.gaming.ai.path.model.IPath;
|
import com.extollit.gaming.ai.path.model.IPath;
|
||||||
import net.minestom.server.attribute.Attributes;
|
import net.minestom.server.attribute.Attributes;
|
||||||
import net.minestom.server.collision.CollisionUtils;
|
import net.minestom.server.collision.CollisionUtils;
|
||||||
@ -406,6 +407,16 @@ public abstract class EntityCreature extends LivingEntity {
|
|||||||
return pathPosition;
|
return pathPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Changes the pathfinding priority for this entity.
|
||||||
|
*
|
||||||
|
* @param schedulingPriority the new scheduling priority
|
||||||
|
* @see <a href="https://github.com/MadMartian/hydrazine-path-finding#path-finding-scheduling">Scheduling Priority</a>
|
||||||
|
*/
|
||||||
|
public void setPathfindingPriority(@NotNull SchedulingPriority schedulingPriority) {
|
||||||
|
this.pathFinder.schedulingPriority(schedulingPriority);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to move the entity toward {@code direction} in the X and Z axis
|
* Used to move the entity toward {@code direction} in the X and Z axis
|
||||||
* Gravity is still applied but the entity will not attempt to jump
|
* Gravity is still applied but the entity will not attempt to jump
|
||||||
|
Loading…
Reference in New Issue
Block a user