Class EmptyMoveController
java.lang.Object
com.ticxo.modelengine.api.nms.entity.impl.EmptyMoveController
- All Implemented Interfaces:
MoveController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddVelocity(double x, double y, double z) Add velocity to the entity.floatgetSpeed()Get the value of the movement speed attribute of this entity.org.bukkit.util.VectorGet the current velocity of this entity.booleanGet the true ground state of this entity.
This is necessary since the default ground state obtain throughEntity.isOnGround()is forcefully set to true to maintain consistent movement speed.voidjump()Cause the entity to jump.voidmove(float side, float front, float speed) Move the entity relative to its rotation.voidmovePassenger(org.bukkit.entity.Entity entity, double x, double y, double z) Synced method for moving a rider of this entity to the correct locationvoidReset fall distance of this entity.
This is used to stop the entity from taking fall damage.voidvoidsetVelocity(double x, double y, double z) Override the entity's velocity.boolean
-
Constructor Details
-
EmptyMoveController
public EmptyMoveController()
-
-
Method Details
-
tickIdleDelay
public boolean tickIdleDelay() -
resetIdleDelay
public void resetIdleDelay() -
move
public void move(float side, float front, float speed) Description copied from interface:MoveControllerMove the entity relative to its rotation.- Specified by:
movein interfaceMoveController- Parameters:
side- side step strengthfront- forward step strengthspeed- speed multiplier
-
jump
public void jump()Description copied from interface:MoveControllerCause the entity to jump.- Specified by:
jumpin interfaceMoveController
-
setVelocity
public void setVelocity(double x, double y, double z) Description copied from interface:MoveControllerOverride the entity's velocity.- Specified by:
setVelocityin interfaceMoveController- Parameters:
x- x velocity in world spacey- y velocity in world spacez- z velocity in world space
-
addVelocity
public void addVelocity(double x, double y, double z) Description copied from interface:MoveControllerAdd velocity to the entity.- Specified by:
addVelocityin interfaceMoveController- Parameters:
x- x velocity in world spacey- y velocity in world spacez- z velocity in world space
-
nullifyFallDistance
public void nullifyFallDistance()Description copied from interface:MoveControllerReset fall distance of this entity.
This is used to stop the entity from taking fall damage.- Specified by:
nullifyFallDistancein interfaceMoveController
-
movePassenger
public void movePassenger(org.bukkit.entity.Entity entity, double x, double y, double z) Description copied from interface:MoveControllerSynced method for moving a rider of this entity to the correct location- Specified by:
movePassengerin interfaceMoveController- Parameters:
entity- rider on this entityx- x coordinatey- y coordinatez- z coordinate
-
isOnGround
public boolean isOnGround()Description copied from interface:MoveControllerGet the true ground state of this entity.
This is necessary since the default ground state obtain throughEntity.isOnGround()is forcefully set to true to maintain consistent movement speed.- Specified by:
isOnGroundin interfaceMoveController
-
getSpeed
public float getSpeed()Description copied from interface:MoveControllerGet the value of the movement speed attribute of this entity.- Specified by:
getSpeedin interfaceMoveController
-
getVelocity
public org.bukkit.util.Vector getVelocity()Description copied from interface:MoveControllerGet the current velocity of this entity.- Specified by:
getVelocityin interfaceMoveController
-