Package net.minecraft.entity.ai.control
Class MoveControl
java.lang.Object
net.minecraft.entity.ai.control.MoveControl
- Direct Known Subclasses:
DolphinEntity.DolphinMoveControl
,DrownedEntity.DrownedMoveControl
,FishEntity.FishMoveControl
,FlightMoveControl
,FoxEntity.FoxMoveControl
,GhastEntity.GhastMoveControl
,GuardianEntity.GuardianMoveControl
,PandaEntity.PandaMoveControl
,PhantomEntity.PhantomMoveControl
,RabbitEntity.RabbitMoveControl
,SlimeEntity.SlimeMoveControl
,TurtleEntity.TurtleMoveControl
,VexEntity.VexMoveControl
public class MoveControl extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MoveControl.State
-
Field Summary
Fields Modifier and Type Field Description protected MobEntity
entity
protected float
forwardMovement
protected float
sidewaysMovement
protected double
speed
protected MoveControl.State
state
protected double
targetX
protected double
targetY
protected double
targetZ
-
Constructor Summary
Constructors Constructor Description MoveControl(MobEntity entity)
-
Method Summary
Modifier and Type Method Description protected float
changeAngle(float from, float to, float max)
double
getSpeed()
double
getTargetX()
double
getTargetY()
double
getTargetZ()
boolean
isMoving()
private boolean
method_25946(float float2, float float3)
void
moveTo(double x, double y, double z, double speed)
void
strafeTo(float forward, float sideways)
void
tick()
-
Field Details
-
entity
-
targetX
protected double targetX -
targetY
protected double targetY -
targetZ
protected double targetZ -
speed
protected double speed -
forwardMovement
protected float forwardMovement -
sidewaysMovement
protected float sidewaysMovement -
state
-
-
Constructor Details
-
MoveControl
-
-
Method Details
-
isMoving
public boolean isMoving() -
getSpeed
public double getSpeed() -
moveTo
public void moveTo(double x, double y, double z, double speed) -
strafeTo
public void strafeTo(float forward, float sideways) -
tick
public void tick() -
method_25946
private boolean method_25946(float float2, float float3) -
changeAngle
protected float changeAngle(float from, float to, float max) -
getTargetX
public double getTargetX() -
getTargetY
public double getTargetY() -
getTargetZ
public double getTargetZ()
-