public abstract class TargetGoal extends Goal
修飾子とタイプ | フィールドと説明 |
---|---|
protected MobEntity |
goalOwner
The entity that this goal belongs to
|
protected boolean |
shouldCheckSight |
protected LivingEntity |
target |
protected int |
unseenMemoryTicks |
コンストラクタと説明 |
---|
TargetGoal(MobEntity mobIn,
boolean checkSight) |
TargetGoal(MobEntity mobIn,
boolean checkSight,
boolean nearbyOnlyIn) |
修飾子とタイプ | メソッドと説明 |
---|---|
protected double |
getTargetDistance() |
protected boolean |
isSuitableTarget(LivingEntity potentialTarget,
EntityPredicate targetPredicate)
checks if is is a suitable target
|
void |
resetTask()
Reset the task's internal state.
|
TargetGoal |
setUnseenMemoryTicks(int unseenMemoryTicksIn) |
boolean |
shouldContinueExecuting()
Returns whether an in-progress EntityAIBase should continue executing
|
void |
startExecuting()
Execute a one shot task or start executing a continuous task
|
getMutexFlags, isPreemptible, setMutexFlags, shouldExecute, tick, toString
protected final MobEntity goalOwner
protected final boolean shouldCheckSight
protected LivingEntity target
protected int unseenMemoryTicks
public TargetGoal(MobEntity mobIn, boolean checkSight)
public TargetGoal(MobEntity mobIn, boolean checkSight, boolean nearbyOnlyIn)
public boolean shouldContinueExecuting()
shouldContinueExecuting
クラス内 Goal
protected double getTargetDistance()
public void startExecuting()
startExecuting
クラス内 Goal
public void resetTask()
protected boolean isSuitableTarget(@Nullable LivingEntity potentialTarget, EntityPredicate targetPredicate)
public TargetGoal setUnseenMemoryTicks(int unseenMemoryTicksIn)