use of org.spongepowered.api.entity.ai.goal.builtin.creature.target.FindNearestAttackableTargetGoal in project SpongeCommon by SpongePowered.
the class SpongeFindNearestAttackableTargetGoalBuilder method build.
@Override
public FindNearestAttackableTargetGoal build(Creature owner) {
Preconditions.checkNotNull(owner);
Preconditions.checkNotNull(this.targetClass);
return (FindNearestAttackableTargetGoal) new NearestAttackableTargetGoal((PathfinderMob) owner, this.targetClass, this.chance, this.checkSight, this.checkOnlyNearby, this.predicate == null ? SpongeFindNearestAttackableTargetGoalBuilder.ALWAYS_TRUE : this.predicate);
}
Aggregations