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 int
protected final Mob
protected double
protected double
protected double
protected float
protected float
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
double
double
double
getXRotD()
getYRotD()
boolean
protected boolean
void
setLookAt
(double pX, double pY, double pZ) void
setLookAt
(double pX, double pY, double pZ, float pDeltaYaw, float pDeltaPitch) Sets position to look atvoid
Sets the controlling mob's look vector to the provided entity's locationvoid
Sets position to look at using entityvoid
Sets the mob's look vectorvoid
tick()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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
-