Class LookControl
java.lang.Object
net.minecraft.world.entity.ai.control.LookControl
- All Implemented Interfaces:
Control
- Direct Known Subclasses:
Bee.BeeLookControl
,Fox.FoxLookControl
,Frog.FrogLookControl
,Phantom.PhantomLookControl
,Shulker.ShulkerLookControl
,SmoothSwimmingLookControl
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected final Mob
protected double
protected double
protected double
protected float
protected float
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
double
double
private static double
getWantedY
(Entity p_24967_) double
getXRotD()
getYRotD()
boolean
protected boolean
protected float
rotateTowards
(float p_24957_, float p_24958_, float p_24959_) void
setLookAt
(double p_24947_, double p_24948_, double p_24949_) void
setLookAt
(double p_24951_, double p_24952_, double p_24953_, float p_24954_, float p_24955_) void
void
void
void
tick()
-
Field Details
-
mob
-
yMaxRotSpeed
protected float yMaxRotSpeed -
xMaxRotAngle
protected float xMaxRotAngle -
lookAtCooldown
protected int lookAtCooldown -
wantedX
protected double wantedX -
wantedY
protected double wantedY -
wantedZ
protected double wantedZ
-
-
Constructor Details
-
LookControl
-
-
Method Details
-
setLookAt
-
setLookAt
-
setLookAt
-
setLookAt
public void setLookAt(double p_24947_, double p_24948_, double p_24949_) -
setLookAt
public void setLookAt(double p_24951_, double p_24952_, double p_24953_, float p_24954_, float p_24955_) -
tick
public void tick() -
clampHeadRotationToBody
protected void clampHeadRotationToBody() -
resetXRotOnTick
protected boolean resetXRotOnTick() -
isLookingAtTarget
public boolean isLookingAtTarget() -
getWantedX
public double getWantedX() -
getWantedY
public double getWantedY() -
getWantedZ
public double getWantedZ() -
getXRotD
-
getYRotD
-
rotateTowards
protected float rotateTowards(float p_24957_, float p_24958_, float p_24959_) -
getWantedY
-