Package net.minecraft.entity.ai.goal
Class LookAtEntityGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.LookAtEntityGoal
- Direct Known Subclasses:
FoxEntity.LookAtEntityGoal
,LookAtCustomerGoal
,PandaEntity.LookAtEntityGoal
,StopAndLookAtEntityGoal
public class LookAtEntityGoal extends Goal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.goal.Goal
Goal.Control
-
Field Summary
Fields Modifier and Type Field Description protected float
chance
private int
lookTime
protected MobEntity
mob
protected float
range
protected Entity
target
protected TargetPredicate
targetPredicate
protected Class<? extends LivingEntity>
targetType
-
Constructor Summary
Constructors Constructor Description LookAtEntityGoal(MobEntity mob, Class<? extends LivingEntity> targetType, float range)
LookAtEntityGoal(MobEntity mob, Class<? extends LivingEntity> targetType, float range, float chance)
-
Method Summary
Modifier and Type Method Description boolean
canStart()
boolean
shouldContinue()
void
start()
void
stop()
void
tick()
Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, toString
-
Field Details
-
mob
-
target
-
range
protected final float range -
lookTime
private int lookTime -
chance
protected final float chance -
targetType
-
targetPredicate
-
-
Constructor Details
-
LookAtEntityGoal
-
LookAtEntityGoal
public LookAtEntityGoal(MobEntity mob, Class<? extends LivingEntity> targetType, float range, float chance)
-
-
Method Details
-
canStart
public boolean canStart() -
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinue
in classGoal
-
start
public void start() -
stop
public void stop() -
tick
public void tick()
-