Vector3d vector3d = this.getMotion();
if (vector3d.y > -0.5D) {
this.fallDistance = 1.0F;
}
Vector3d vector3d1 = this.getLookVec();
if (Wonderful.getInstance().getFunctionRegistry().getKillAura().isState() && this instanceof ClientPlayerEntity) {
vector3d1 = this.getVectorForRotation(KillAura.rotateVector.y, KillAura.rotateVector.x);
}
float f = this.rotationPitch * ((float) Math.PI / 180F);
if (Wonderful.getInstance().getFunctionRegistry().getKillAura().isState() && this instanceof ClientPlayerEntity) {
f = KillAura.rotateVector.y * ((float) Math.PI / 180F);
}
double d1 = Math.sqrt(vector3d1.x * vector3d1.x + vector3d1.z * vector3d1.z);
double d3 = Math.sqrt(horizontalMag(vector3d));
double d4 = vector3d1.length();
float f1 = MathHelper.cos(f);
f1 = (float)((double)f1 * (double)f1 * Math.min(1.0, d4 / 0.4));
vector3d = this.getMotion().add(0.0, d0 * (-1.0 + (double)f1 * 0.75), 0.0);
double d9;
if (vector3d.y < 0.0 && d1 > 0.0) {
d9 = vector3d.y * -0.1 * (double)f1;
vector3d = vector3d.add(vector3d1.x * d9 / d1, d9, vector3d1.z * d9 / d1);
}
if (f < 0.0F && d1 > 0.0) {
d9 = d3 * (double)(-MathHelper.sin(f)) * 0.04;
vector3d = vector3d.add(-vector3d1.x * d9 / d1, d9 * 3.2, -vector3d1.z * d9 / d1);
}
if (d1 > 0.0) {
vector3d = vector3d.add((vector3d1.x / d1 * d3 - vector3d.x) * 0.1, 0.0, (vector3d1.z / d1 * d3 - vector3d.z) * 0.1);
}
this.setMotion(vector3d.mul((double) 0.99F, (double) 0.98F, (double) 0.99F));
this.move(MoverType.SELF, this.getMotion());
if (this.collidedHorizontally && !this.world.isRemote) {
double d10 = Math.sqrt(horizontalMag(this.getMotion()));
double d6 = d3 - d10;
float f2 = (float) (d6 * 10.0D - 3.0D);
if (f2 > 0.0F) {
this.playSound(this.getFallSound((int) f2), 1.0F, 1.0F);
this.attackEntityFrom(DamageSource.FLY_INTO_WALL, f2);
}
}
if (this.onGround && !this.world.isRemote) {
this.setFlag(7, false);
}