public abstract class TargetGoal extends Goal
| Modifier and Type | Field and Description |
|---|---|
protected MobEntity |
goalOwner |
protected boolean |
shouldCheckSight |
protected LivingEntity |
target |
protected int |
unseenMemoryTicks |
| Constructor and Description |
|---|
TargetGoal(MobEntity mobIn,
boolean checkSight) |
TargetGoal(MobEntity mobIn,
boolean checkSight,
boolean nearbyOnlyIn) |
| Modifier and Type | Method and Description |
|---|---|
protected double |
getTargetDistance() |
protected boolean |
isSuitableTarget(LivingEntity potentialTarget,
EntityPredicate targetPredicate) |
void |
resetTask() |
TargetGoal |
setUnseenMemoryTicks(int unseenMemoryTicksIn) |
boolean |
shouldContinueExecuting() |
void |
startExecuting() |
getMutexFlags, isPreemptible, setMutexFlags, shouldExecute, tick, toStringprotected 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 in class Goalprotected double getTargetDistance()
public void startExecuting()
startExecuting in class Goalprotected boolean isSuitableTarget(@Nullable
LivingEntity potentialTarget,
EntityPredicate targetPredicate)
public TargetGoal setUnseenMemoryTicks(int unseenMemoryTicksIn)