quick fix : Statement with empty body

This commit is contained in:
Alexdoru authored and Jason Mitchell committed 2023-01-28 18:02:41 -08:00
1 parent 3f0854baeb
commit fbccf4e087
12 files changed
+63 -51

No files matched your search

@@ -333,9 +333,9 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
speed = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
for (this.rotationPitch = (float) (Math.atan2(this.motionY, speed) * 180.0D / Math.PI);
this.rotationPitch - this.prevRotationPitch < -180.0F;
this.prevRotationPitch -= 360.0F) {
this.rotationPitch = (float) (Math.atan2(this.motionY, speed) * 180.0D / Math.PI);
while (this.rotationPitch - this.prevRotationPitch < -180.0F) {
this.prevRotationPitch -= 360.0F;
}
while (this.rotationPitch - this.prevRotationPitch >= 180.0F) {
@@ -219,12 +219,19 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData {
posZ += motionZ;
float f1 = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
rotationYaw = (float) ((Math.atan2(motionX, motionZ) * 180D) / 3.1415927410125732D);
for (rotationPitch = (float) ((Math.atan2(motionY, f1) * 180D) / 3.1415927410125732D);
rotationPitch - prevRotationPitch < -180F;
prevRotationPitch -= 360F) {}
for (; rotationPitch - prevRotationPitch >= 180F; prevRotationPitch += 360F) {}
for (; rotationYaw - prevRotationYaw < -180F; prevRotationYaw -= 360F) {}
for (; rotationYaw - prevRotationYaw >= 180F; prevRotationYaw += 360F) {}
rotationPitch = (float) ((Math.atan2(motionY, f1) * 180D) / 3.1415927410125732D);
while (rotationPitch - prevRotationPitch < -180F) {
prevRotationPitch -= 360F;
}
while (rotationPitch - prevRotationPitch >= 180F) {
prevRotationPitch += 360F;
}
while (rotationYaw - prevRotationYaw < -180F) {
prevRotationYaw -= 360F;
}
while (rotationYaw - prevRotationYaw >= 180F) {
prevRotationYaw += 360F;
}
rotationPitch = prevRotationPitch + (rotationPitch - prevRotationPitch) * 0.2F;
rotationYaw = prevRotationYaw + (rotationYaw - prevRotationYaw) * 0.2F;
float f2 = 0.99F;
@@ -251,7 +258,10 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData {
setPosition(posX, posY, posZ);
if (!onGround) {
prevBoomerangRotation = boomerangRotation;
for (boomerangRotation += 36F; boomerangRotation > 360F; boomerangRotation -= 360F) {}
boomerangRotation += 36F;
while (boomerangRotation > 360F) {
boomerangRotation -= 360F;
}
}
}