Class EmptyMoveController
java.lang.Object
com.ticxo.modelengine.api.nms.entity.impl.EmptyMoveController
- All Implemented Interfaces:
MoveController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addVelocity
(double x, double y, double z) Add velocity to the entity.float
getSpeed()
Get the value of the movement speed attribute of this entity.org.bukkit.util.Vector
Get the current velocity of this entity.boolean
Get 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.void
jump()
Cause the entity to jump.void
move
(float side, float front, float speed) Move the entity relative to its rotation.void
movePassenger
(org.bukkit.entity.Entity entity, double x, double y, double z) Synced method for moving a rider of this entity to the correct locationvoid
Reset fall distance of this entity.
This is used to stop the entity from taking fall damage.void
void
setVelocity
(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:MoveController
Move the entity relative to its rotation.- Specified by:
move
in interfaceMoveController
- Parameters:
side
- side step strengthfront
- forward step strengthspeed
- speed multiplier
-
jump
public void jump()Description copied from interface:MoveController
Cause the entity to jump.- Specified by:
jump
in interfaceMoveController
-
setVelocity
public void setVelocity(double x, double y, double z) Description copied from interface:MoveController
Override the entity's velocity.- Specified by:
setVelocity
in 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:MoveController
Add velocity to the entity.- Specified by:
addVelocity
in 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:MoveController
Reset fall distance of this entity.
This is used to stop the entity from taking fall damage.- Specified by:
nullifyFallDistance
in interfaceMoveController
-
movePassenger
public void movePassenger(org.bukkit.entity.Entity entity, double x, double y, double z) Description copied from interface:MoveController
Synced method for moving a rider of this entity to the correct location- Specified by:
movePassenger
in interfaceMoveController
- Parameters:
entity
- rider on this entityx
- x coordinatey
- y coordinatez
- z coordinate
-
isOnGround
public boolean isOnGround()Description copied from interface:MoveController
Get 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:
isOnGround
in interfaceMoveController
-
getSpeed
public float getSpeed()Description copied from interface:MoveController
Get the value of the movement speed attribute of this entity.- Specified by:
getSpeed
in interfaceMoveController
-
getVelocity
public org.bukkit.util.Vector getVelocity()Description copied from interface:MoveController
Get the current velocity of this entity.- Specified by:
getVelocity
in interfaceMoveController
-