public class EntityAINearestAttackableTarget<T extends EntityLivingBase> extends EntityAITarget
Modifier and Type | Class and Description |
---|---|
static class |
EntityAINearestAttackableTarget.Sorter |
Modifier and Type | Field and Description |
---|---|
protected EntityAINearestAttackableTarget.Sorter |
sorter |
protected java.lang.Class<T> |
targetClass |
protected T |
targetEntity |
protected java.util.function.Predicate<? super T> |
targetEntitySelector |
shouldCheckSight, target, taskOwner, unseenMemoryTicks
Constructor and Description |
---|
EntityAINearestAttackableTarget(EntityCreature creature,
java.lang.Class<T> classTarget,
boolean checkSight) |
EntityAINearestAttackableTarget(EntityCreature creature,
java.lang.Class<T> classTarget,
boolean checkSight,
boolean onlyNearby) |
EntityAINearestAttackableTarget(EntityCreature p_i48572_1_,
java.lang.Class<T> p_i48572_2_,
int p_i48572_3_,
boolean p_i48572_4_,
boolean p_i48572_5_,
java.util.function.Predicate<? super T> p_i48572_6_) |
Modifier and Type | Method and Description |
---|---|
protected AxisAlignedBB |
getTargetableArea(double targetDistance) |
boolean |
shouldExecute() |
void |
startExecuting() |
getTargetDistance, isSuitableTarget, isSuitableTarget, resetTask, setUnseenMemoryTicks, shouldContinueExecuting
getMutexBits, isInterruptible, setMutexBits, tick
protected final java.lang.Class<T extends EntityLivingBase> targetClass
protected final EntityAINearestAttackableTarget.Sorter sorter
protected final java.util.function.Predicate<? super T extends EntityLivingBase> targetEntitySelector
protected T extends EntityLivingBase targetEntity
public EntityAINearestAttackableTarget(EntityCreature creature, java.lang.Class<T> classTarget, boolean checkSight)
public EntityAINearestAttackableTarget(EntityCreature creature, java.lang.Class<T> classTarget, boolean checkSight, boolean onlyNearby)
public EntityAINearestAttackableTarget(EntityCreature p_i48572_1_, java.lang.Class<T> p_i48572_2_, int p_i48572_3_, boolean p_i48572_4_, boolean p_i48572_5_, @Nullable java.util.function.Predicate<? super T> p_i48572_6_)
public boolean shouldExecute()
shouldExecute
in class EntityAIBase
protected AxisAlignedBB getTargetableArea(double targetDistance)
public void startExecuting()
startExecuting
in class EntityAITarget