public class TargetNearestGoal extends TargetGoal
shouldCheckSight, targetDistance, taskOwner
Constructor and Description |
---|
TargetNearestGoal(net.minecraft.entity.CreatureEntity entity,
float targetRange,
boolean par5) |
TargetNearestGoal(net.minecraft.entity.CreatureEntity entity,
float targetRange,
boolean par5,
boolean par6) |
Modifier and Type | Method and Description |
---|---|
boolean |
canContinueToUse()
Returns whether an in-progress EntityAIBase should continue executing.
|
boolean |
canUse()
Returns whether the EntityAIBase should begin execution.
|
void |
setTargetDistance(float targetDistance) |
void |
start()
Execute a one shot task or start executing a continuous task
|
void |
stop()
Resets the task.
|
void |
tick() |
isSuitableTarget
public TargetNearestGoal(net.minecraft.entity.CreatureEntity entity, float targetRange, boolean par5)
public TargetNearestGoal(net.minecraft.entity.CreatureEntity entity, float targetRange, boolean par5, boolean par6)
public void setTargetDistance(float targetDistance)
public boolean canUse()
canUse
in class net.minecraft.entity.ai.goal.Goal
public void start()
start
in class TargetGoal
public void tick()
tick
in class TargetGoal
public void stop()
TargetGoal
stop
in class TargetGoal
public boolean canContinueToUse()
TargetGoal
canContinueToUse
in class TargetGoal