public class LookControl extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
active |
protected MobEntity |
entity |
protected double |
lookX |
protected double |
lookY |
protected double |
lookZ |
protected float |
pitchSpeed |
protected float |
yawSpeed |
Constructor and Description |
---|
LookControl(MobEntity entity) |
Modifier and Type | Method and Description |
---|---|
protected float |
changeAngle(float from,
float to,
float max) |
private static double |
getLookingHeightFor(Entity entity) |
double |
getLookX() |
double |
getLookY() |
double |
getLookZ() |
protected float |
getTargetPitch() |
protected float |
getTargetYaw() |
boolean |
isActive() |
void |
lookAt(double x,
double y,
double z) |
void |
lookAt(double x,
double y,
double z,
float yawSpeed,
float pitchSpeed) |
void |
lookAt(Entity entity,
float yawSpeed,
float pitchSpeed) |
void |
lookAt(Vec3d direction) |
protected boolean |
shouldStayHorizontal() |
void |
tick() |
protected final MobEntity entity
protected float yawSpeed
protected float pitchSpeed
protected boolean active
protected double lookX
protected double lookY
protected double lookZ
public LookControl(MobEntity entity)
public void lookAt(Vec3d direction)
public void lookAt(Entity entity, float yawSpeed, float pitchSpeed)
public void lookAt(double x, double y, double z)
public void lookAt(double x, double y, double z, float yawSpeed, float pitchSpeed)
public void tick()
protected boolean shouldStayHorizontal()
public boolean isActive()
public double getLookX()
public double getLookY()
public double getLookZ()
protected float getTargetPitch()
protected float getTargetYaw()
protected float changeAngle(float from, float to, float max)
private static double getLookingHeightFor(Entity entity)