Class LookControl
java.lang.Object
net.minecraft.world.entity.ai.control.LookControl
- All Implemented Interfaces:
Control
- Direct Known Subclasses:
Bee.BeeLookControl,Camel.CamelLookControl,Fox.FoxLookControl,Frog.FrogLookControl,Phantom.PhantomLookControl,Shulker.ShulkerLookControl,SmoothSwimmingLookControl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected final Mobprotected doubleprotected doubleprotected doubleprotected floatprotected float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoubledoubleprivate static doublegetWantedY(Entity p_24967_) doublegetXRotD()getYRotD()booleanprotected booleanprotected floatrotateTowards(float p_24957_, float p_24958_, float p_24959_) voidsetLookAt(double p_24947_, double p_24948_, double p_24949_) voidsetLookAt(double p_24951_, double p_24952_, double p_24953_, float p_24954_, float p_24955_) voidvoidvoidvoidtick()
-
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
-