public abstract class TargetGoal extends Goal
| Modifier and Type | Field and Description |
|---|---|
protected MobEntity |
goalOwner |
private boolean |
nearbyOnly |
protected boolean |
shouldCheckSight |
protected LivingEntity |
target |
private int |
targetSearchDelay |
private int |
targetSearchStatus |
private int |
targetUnseenTicks |
protected int |
unseenMemoryTicks |
| Constructor and Description |
|---|
TargetGoal(MobEntity mobIn,
boolean checkSight) |
TargetGoal(MobEntity mobIn,
boolean checkSight,
boolean nearbyOnlyIn) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
canEasilyReach(LivingEntity target) |
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
private final boolean nearbyOnly
private int targetSearchStatus
private int targetSearchDelay
private int targetUnseenTicks
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)
private boolean canEasilyReach(LivingEntity target)
public TargetGoal setUnseenMemoryTicks(int unseenMemoryTicksIn)