@Override
public void moveFlying(float f, float f2, float f3) {
MoveFlyingEvent moveFlyingEvent = new MoveFlyingEvent(f, f2, f3).publishItself();
f = moveFlyingEvent.getStrafe();
f2 = moveFlyingEvent.getForward();
if (moveFlyingEvent.isCancelled()) {
return;
}
float f4 = PlayerHandler.moveFix ? PlayerHandler.yaw : this.rotationYaw;
float f5 = f * f + f2 * f2;
if (f5 >= 1.0E-4f) {
if ((f5 = MathHelper.sqrt_float(f5)) < 1.0f) {
f5 = 1.0f;
}
f5 = f3 / f5;
float f6 = MathHelper.sin(f4 * (float)Math.PI / 180.0f);
float f7 = MathHelper.cos(f4 * (float)Math.PI / 180.0f);
this.motionX += (double)((f *= f5) * f7 - (f2 *= f5) * f6);
this.motionZ += (double)(f2 * f7 + f * f6);
}
}