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
Modifier and TypeMethodDescriptionprotected voiddoubledoubledoublegetXRotD()getYRotD()booleanprotected booleanvoidsetLookAt(double pX, double pY, double pZ) voidsetLookAt(double pX, double pY, double pZ, float pDeltaYaw, float pDeltaPitch) Sets position to look atvoidSets the controlling mob's look vector to the provided entity's locationvoidSets position to look at using entityvoidSets the mob's look vectorvoidtick()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.entity.ai.control.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
Sets the mob's look vector -
setLookAt
Sets the controlling mob's look vector to the provided entity's location -
setLookAt
Sets position to look at using entity -
setLookAt
public void setLookAt(double pX, double pY, double pZ) -
setLookAt
public void setLookAt(double pX, double pY, double pZ, float pDeltaYaw, float pDeltaPitch) Sets position to look at -
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
-