quick fix : Redundant type cast

This commit is contained in:
Alexdoru authored and Jason Mitchell committed 2023-01-28 18:02:41 -08:00
1 parent b34eec4dea
commit 2d13e6185e
84 files changed
+426 -434

No files matched your search

@@ -76,7 +76,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
this.prevRotationYaw =
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
this.prevRotationPitch =
this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f) * 180.0D / Math.PI);
this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / Math.PI);
}
Block i = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
@@ -107,9 +107,9 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
}
} else {
this.inGround = false;
this.motionX *= (double) (this.rand.nextFloat() * 0.2F);
this.motionY *= (double) (this.rand.nextFloat() * 0.2F);
this.motionZ *= (double) (this.rand.nextFloat() * 0.2F);
this.motionX *= this.rand.nextFloat() * 0.2F;
this.motionY *= this.rand.nextFloat() * 0.2F;
this.motionZ *= this.rand.nextFloat() * 0.2F;
this.ticksInGround = 0;
this.ticksInAir = 0;
}
@@ -147,7 +147,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) {
ySpeed = 0.3F;
AxisAlignedBB axisalignedbb1 =
entity1.boundingBox.expand((double) ySpeed, (double) ySpeed, (double) ySpeed);
entity1.boundingBox.expand(ySpeed, ySpeed, ySpeed);
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec3, vec31);
if (movingobjectposition1 != null) {
@@ -294,9 +294,9 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
this.inData = this.worldObj.getBlockMetadata(
this.field_145791_d, this.field_145792_e, this.field_145789_f);
this.motionX = (double) ((float) (movingobjectposition.hitVec.xCoord - this.posX));
this.motionY = (double) ((float) (movingobjectposition.hitVec.yCoord - this.posY));
this.motionZ = (double) ((float) (movingobjectposition.hitVec.zCoord - this.posZ));
this.motionX = (float) (movingobjectposition.hitVec.xCoord - this.posX);
this.motionY = (float) (movingobjectposition.hitVec.yCoord - this.posY);
this.motionZ = (float) (movingobjectposition.hitVec.zCoord - this.posZ);
speed = MathHelper.sqrt_double(
this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
this.posX -= this.motionX / (double) speed * 0.05000000074505806D;
@@ -333,7 +333,7 @@ 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, (double) speed) * 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) {
}
@@ -372,10 +372,10 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
dropSpeed = 0.8F;
}
this.motionX *= (double) dropSpeed;
this.motionY *= (double) dropSpeed;
this.motionZ *= (double) dropSpeed;
this.motionY -= (double) ySpeed;
this.motionX *= dropSpeed;
this.motionY *= dropSpeed;
this.motionZ *= dropSpeed;
this.motionY -= ySpeed;
this.setPosition(this.posX, this.posY, this.posZ);
this.func_145775_I();
}