Package net.minecraft.entity.ai.control
Class LookControl
java.lang.Object
net.minecraft.entity.ai.control.LookControl
- Direct Known Subclasses:
BeeEntity.BeeLookControl,DolphinLookControl,FoxEntity.FoxLookControl,PhantomEntity.PhantomLookControl
public class LookControl extends Object
-
Field Summary
-
Constructor Summary
Constructors Constructor Description LookControl(MobEntity entity) -
Method Summary
Modifier and Type Method Description protected floatchangeAngle(float from, float to, float max)private static doublegetLookingHeightFor(Entity entity)doublegetLookX()doublegetLookY()doublegetLookZ()protected floatgetTargetPitch()protected floatgetTargetYaw()booleanisActive()voidlookAt(double x, double y, double z)voidlookAt(double x, double y, double z, float yawSpeed, float pitchSpeed)voidlookAt(Entity entity, float yawSpeed, float pitchSpeed)voidlookAt(Vec3d direction)protected booleanshouldStayHorizontal()voidtick()
-
Field Details
-
entity
-
yawSpeed
protected float yawSpeed -
pitchSpeed
protected float pitchSpeed -
active
protected boolean active -
lookX
protected double lookX -
lookY
protected double lookY -
lookZ
protected double lookZ
-
-
Constructor Details
-
LookControl
-
-
Method Details
-
lookAt
-
lookAt
-
lookAt
public void lookAt(double x, double y, double z) -
lookAt
public void lookAt(double x, double y, double z, float yawSpeed, float pitchSpeed) -
tick
public void tick() -
shouldStayHorizontal
protected boolean shouldStayHorizontal() -
isActive
public boolean isActive() -
getLookX
public double getLookX() -
getLookY
public double getLookY() -
getLookZ
public double getLookZ() -
getTargetPitch
protected float getTargetPitch() -
getTargetYaw
protected float getTargetYaw() -
changeAngle
protected float changeAngle(float from, float to, float max) -
getLookingHeightFor
-