velocity = entity.getPhysics().getMovementVelocity(); //TODO: Check if it's alright.
} else {
velocity = Vector3f.ZERO;
}
velocity = velocity.max(factor.mul(-1)).min(factor);
double s = 8000d;
speedX = (short) (velocity.getX() * s);
speedY = (short) (velocity.getY() * s);
speedZ = (short) (velocity.getZ() * s);