Class EmptyMoveController
java.lang.Object
com.ticxo.modelengine.api.nms.impl.EmptyMoveController
- All Implemented Interfaces:
MoveController
-
Constructor Summary
Constructors -
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.void
globalMove
(float x, float y, float z, float speedModifier) boolean
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 up, float front, float speedModifier) Move the entity relative to its rotation.void
Reset fall distance of this entity.
This is used to stop the entity from taking fall damage.void
queuePostTick
(Runnable runnable) void
setVelocity
(double x, double y, double z) Override the entity's velocity.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ticxo.modelengine.api.nms.entity.wrapper.MoveController
movePassenger
-
Constructor Details
-
EmptyMoveController
public EmptyMoveController()
-
-
Method Details
-
move
public void move(float side, float up, float front, float speedModifier) Description copied from interface:MoveController
Move the entity relative to its rotation.- Specified by:
move
in interfaceMoveController
- Parameters:
side
- side step strengthup
- up step strengthfront
- forward step strengthspeedModifier
- speed multiplier
-
globalMove
public void globalMove(float x, float y, float z, float speedModifier) - Specified by:
globalMove
in interfaceMoveController
-
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
-
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
-
isInWater
public boolean isInWater()- Specified by:
isInWater
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
-
queuePostTick
- Specified by:
queuePostTick
in interfaceMoveController
-