Package net.minecraft.entity.ai.control
Class MoveControl
java.lang.Object
net.minecraft.entity.ai.control.MoveControl
- Direct Known Subclasses:
class_5757,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 classMoveControl.State -
Field Summary
Fields Modifier and Type Field Description protected MobEntityentityprotected floatforwardMovementprotected floatsidewaysMovementprotected doublespeedprotected MoveControl.Statestateprotected doubletargetXprotected doubletargetYprotected doubletargetZ -
Constructor Summary
Constructors Constructor Description MoveControl(MobEntity entity) -
Method Summary
Modifier and Type Method Description protected floatchangeAngle(float from, float to, float max)doublegetSpeed()doublegetTargetX()doublegetTargetY()doublegetTargetZ()booleanisMoving()private booleanmethod_25946(float float2, float float3)voidmoveTo(double x, double y, double z, double speed)voidstrafeTo(float forward, float sideways)voidtick()
-
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()
-