Commit 3cbbf26c by Jonathan Thomas

Fixing FuzzyTargeting on LEAD behavior to move towards the general random point

parent 06514055
Pipeline #12711 passed with stages
in 1 minute 56 seconds
......@@ -97,7 +97,6 @@ public class LeadPlayerGoal extends PlayerBaseGoal {
Path path = this.entity.getNavigation().findPathTo(this.currentTarget.x, this.currentTarget.y, this.currentTarget.z, 1);
if (path != null) {
LOGGER.info("Start moving towards waypoint PATH");
this.entity.getNavigation().startMovingAlong(path, this.speed);
} else {
......
......@@ -24,10 +24,10 @@ public class RandomTargetFinder {
Vec3d target = getTargetInDirection(entity, constrainedDirection, minDistance, maxDistance);
if (entity instanceof PathAwareEntity) {
Vec3d validTarget = FuzzyTargeting.findFrom((PathAwareEntity) entity, (int) maxDistance, (int) maxDistance / 2, target);
Vec3d validTarget = FuzzyTargeting.findTo((PathAwareEntity) entity, (int) maxDistance, (int) maxDistance, target);
if (validTarget != null && isWithinDistance(entityPos, validTarget, minDistance, maxDistance)) {
Path path = entity.getNavigation().findPathTo(validTarget.x, validTarget.y, validTarget.z, 1);
Path path = entity.getNavigation().findPathTo(validTarget.x, validTarget.y, validTarget.z, 4);
if (path != null) {
return validTarget;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment