public class NearestAttackableTargetGoal<T extends LivingEntity> extends TargetGoal
| 修飾子とタイプ | フィールドと説明 | 
|---|---|
| protected LivingEntity | nearestTarget | 
| protected int | targetChance | 
| protected java.lang.Class<T> | targetClass | 
| protected EntityPredicate | targetEntitySelectorThis filter is applied to the Entity search. | 
goalOwner, shouldCheckSight, target, unseenMemoryTicks| コンストラクタと説明 | 
|---|
| NearestAttackableTargetGoal(MobEntity goalOwnerIn,
                           java.lang.Class<T> targetClassIn,
                           boolean checkSight) | 
| NearestAttackableTargetGoal(MobEntity goalOwnerIn,
                           java.lang.Class<T> targetClassIn,
                           boolean checkSight,
                           boolean nearbyOnlyIn) | 
| NearestAttackableTargetGoal(MobEntity goalOwnerIn,
                           java.lang.Class<T> targetClassIn,
                           int targetChanceIn,
                           boolean checkSight,
                           boolean nearbyOnlyIn,
                           java.util.function.Predicate<LivingEntity> targetPredicate) | 
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
| protected void | findNearestTarget() | 
| protected AxisAlignedBB | getTargetableArea(double targetDistance) | 
| boolean | shouldExecute()Returns whether execution should begin. | 
| void | startExecuting()Execute a one shot task or start executing a continuous task | 
getTargetDistance, isSuitableTarget, resetTask, setUnseenMemoryTicks, shouldContinueExecutinggetMutexFlags, isPreemptible, setMutexFlags, tick, toStringprotected final java.lang.Class<T extends LivingEntity> targetClass
protected final int targetChance
protected LivingEntity nearestTarget
protected EntityPredicate targetEntitySelector
public NearestAttackableTargetGoal(MobEntity goalOwnerIn, java.lang.Class<T> targetClassIn, boolean checkSight)
public NearestAttackableTargetGoal(MobEntity goalOwnerIn, java.lang.Class<T> targetClassIn, boolean checkSight, boolean nearbyOnlyIn)
public NearestAttackableTargetGoal(MobEntity goalOwnerIn, java.lang.Class<T> targetClassIn, int targetChanceIn, boolean checkSight, boolean nearbyOnlyIn, @Nullable java.util.function.Predicate<LivingEntity> targetPredicate)
public boolean shouldExecute()
shouldExecute クラス内 Goalprotected AxisAlignedBB getTargetableArea(double targetDistance)
protected void findNearestTarget()
public void startExecuting()
startExecuting クラス内 TargetGoal