Search in sources :

Example 1 with NearestAttackableTargetGoal

use of net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal 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);
}
Also used : FindNearestAttackableTargetGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.target.FindNearestAttackableTargetGoal) NearestAttackableTargetGoal(net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal) PathfinderMob(net.minecraft.world.entity.PathfinderMob) FindNearestAttackableTargetGoal(org.spongepowered.api.entity.ai.goal.builtin.creature.target.FindNearestAttackableTargetGoal)

Aggregations

PathfinderMob (net.minecraft.world.entity.PathfinderMob)1 NearestAttackableTargetGoal (net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal)1 FindNearestAttackableTargetGoal (org.spongepowered.api.entity.ai.goal.builtin.creature.target.FindNearestAttackableTargetGoal)1