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

@@ -188,12 +188,12 @@ public class Battleaxe extends AOEHarvestTool implements IBattlegearWeapon {
if (increase > 0.56f) increase = 0.56f;
player.motionY += increase;
player.motionX = (double) (-MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI)
player.motionX = -MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI)
* MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)
* speed);
player.motionZ = (double) (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI)
* speed;
player.motionZ = MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI)
* MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)
* speed);
* speed;
}
}
}
@@ -64,12 +64,12 @@ public class Longsword extends Weapon {
float speed = 0.05F * time;
if (speed > 0.925f) speed = 0.925f;
player.motionX = (double) (-MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI)
player.motionX = -MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI)
* MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)
* speed);
player.motionZ = (double) (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI)
* speed;
player.motionZ = MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI)
* MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)
* speed);
* speed;
}
}
@@ -93,7 +93,7 @@ public class LumberAxe extends AOEHarvestTool {
if (wood.isWood(world, x, y, z) || wood.getMaterial() == Material.sponge)
if (detectTree(world, x, y, z)) {
TreeChopTask chopper =
new TreeChopTask((AOEHarvestTool) this, stack, new ChunkPosition(x, y, z), player, 128);
new TreeChopTask(this, stack, new ChunkPosition(x, y, z), player, 128);
try {
FMLCommonHandler.instance().bus().register(chopper);
} catch (LinkageError l) {
@@ -26,12 +26,12 @@ public class Rapier extends Weapon {
player.addExhaustion(0.1f);
player.motionY += 0.32;
float f = 0.5F;
player.motionX = (double) (MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI)
player.motionX = MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI)
* MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)
* f);
player.motionZ = (double) (-MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI)
* f;
player.motionZ = -MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI)
* MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)
* f);
* f;
}
return stack;
}