Class LookControl
java.lang.Object
net.minecraft.world.entity.ai.control.LookControl
- All Implemented Interfaces:
Control
- Direct Known Subclasses:
Bee.BeeLookControl, Camel.CamelLookControl, Creaking.CreakingLookControl, Fox.FoxLookControl, Frog.FrogLookControl, HappyGhast.HappyGhastLookControl, Phantom.PhantomLookControl, Shulker.ShulkerLookControl, SmoothSwimmingLookControl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected final Mobprotected doubleprotected doubleprotected doubleprotected floatprotected float -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Control
rotateTowards
-
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 x, double y, double z) -
setLookAt
public void setLookAt(double x, double y, double z, float yMaxRotSpeed, float xMaxRotAngle) -
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
-