modifyVelocity

fun Entity.modifyVelocity(x: Number = 0.0, y: Number = 0.0, z: Number = 0.0, add: Boolean = true)(source)

Changes the velocity of this Entity and calls markVelocityDirty.

Parameters

add

Whether the velocity should be added to the current one or not. Set this to false if you want to overwrite the previous velocity.


inline fun Entity.modifyVelocity(block: (Vec3) -> Vec3)(source)

Changes the velocity of this Entity using the given mutation logic in block. After that, markVelocityDirty is called.


fun Entity.modifyVelocity(vec: Vec3)(source)

Sets the Entitys velocity to vec and calls markVelocityDirty.