Deleted unnecessary casts with Eclipse

This commit is contained in:
Andrew
2014-09-28 11:56:16 -07:00
parent 94d5319038
commit da63aca95c
89 changed files with 348 additions and 360 deletions
@@ -84,7 +84,7 @@ public class AEBaseItemBlock extends ItemBlock
{
up = ForgeDirection.UP;
byte rotation = (byte) (MathHelper.floor_double( (double) ((player.rotationYaw * 4F) / 360F) + 2.5D ) & 3);
byte rotation = (byte) (MathHelper.floor_double( (player.rotationYaw * 4F) / 360F + 2.5D ) & 3);
switch (rotation)
{
@@ -7,7 +7,6 @@ import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
@@ -89,7 +88,7 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
if ( CommonHelper.proxy.shouldAddParticles( r ) )
{
LightningFX fx = new LightningFX( w, xOff + 0.5 + x, yOff + 0.5 + y, zOff + 0.5 + z, 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
}
@@ -33,7 +33,7 @@ public class BlockLightDetector extends BlockQuartzTorch
public int isProvidingWeakPower(IBlockAccess w, int x, int y, int z, int side)
{
if ( w instanceof World && ((TileLightDetector) getTileEntity( w, x, y, z )).isReady() )
return (int) ((World) w).getBlockLightValue( x, y, z ) - 6;
return ((World) w).getBlockLightValue( x, y, z ) - 6;
return 0;
}
@@ -5,7 +5,6 @@ import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@@ -56,8 +55,8 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
if ( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
{
double d0 = (double) (r.nextFloat() - 0.5F);
double d1 = (double) (r.nextFloat() - 0.5F);
double d0 = r.nextFloat() - 0.5F;
double d1 = r.nextFloat() - 0.5F;
ForgeDirection up = tileQuartzGrowthAccelerator.getUp();
ForgeDirection forward = tileQuartzGrowthAccelerator.getForward();
@@ -113,7 +112,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
rz += dz * forward.offsetZ;
LightningFX fx = new LightningFX( w, rx, ry, rz, 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
}
@@ -8,7 +8,6 @@ import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
@@ -129,7 +128,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
{
LightningFX fx = new LightningFX( w, xOff + 0.5 + x, yOff + 0.5 + y, zOff + 0.5 + z, 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
}
}
@@ -73,9 +73,9 @@ public class BlockVibrationChamber extends AEBaseBlock
TileVibrationChamber tc = (TileVibrationChamber) tile;
if ( tc.isOn )
{
float f1 = (float) x + 0.5F;
float f2 = (float) y + 0.5F;
float f3 = (float) z + 0.5F;
float f1 = x + 0.5F;
float f2 = y + 0.5F;
float f3 = z + 0.5F;
ForgeDirection forward = tc.getForward();
ForgeDirection up = tc.getUp();
@@ -99,8 +99,8 @@ public class BlockVibrationChamber extends AEBaseBlock
f2 += west_y * (0.3 * ox - 0.15);
f3 += west_z * (0.3 * ox - 0.15);
w.spawnParticle( "smoke", (double) f1, (double) f2, (double) f3, 0.0D, 0.0D, 0.0D );
w.spawnParticle( "flame", (double) f1, (double) f2, (double) f3, 0.0D, 0.0D, 0.0D );
w.spawnParticle( "smoke", f1, f2, f3, 0.0D, 0.0D, 0.0D );
w.spawnParticle( "flame", f1, f2, f3, 0.0D, 0.0D, 0.0D );
}
}
}
@@ -115,15 +115,15 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
{
for (int k1 = 0; k1 < b0; ++k1)
{
double d0 = (double) target.blockX + ((double) i1 + 0.5D) / (double) b0;
double d1 = (double) target.blockY + ((double) j1 + 0.5D) / (double) b0;
double d2 = (double) target.blockZ + ((double) k1 + 0.5D) / (double) b0;
double d0 = target.blockX + (i1 + 0.5D) / b0;
double d1 = target.blockY + (j1 + 0.5D) / b0;
double d2 = target.blockZ + (k1 + 0.5D) / b0;
double dd0 = target.hitVec.xCoord;
double dd1 = target.hitVec.yCoord;
double dd2 = target.hitVec.zCoord;
EntityDiggingFX fx = (new EntityDiggingFX( world, dd0, dd1, dd2, d0 - (double) target.blockX - 0.5D, d1 - (double) target.blockY
- 0.5D, d2 - (double) target.blockZ - 0.5D, this, 0 )).applyColourMultiplier( target.blockX, target.blockY, target.blockZ );
EntityDiggingFX fx = (new EntityDiggingFX( world, dd0, dd1, dd2, d0 - target.blockX - 0.5D, d1 - target.blockY
- 0.5D, d2 - target.blockZ - 0.5D, this, 0 )).applyColourMultiplier( target.blockX, target.blockY, target.blockZ );
fx.setParticleIcon( ico );
@@ -162,10 +162,10 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
{
for (int k1 = 0; k1 < b0; ++k1)
{
double d0 = (double) x + ((double) i1 + 0.5D) / (double) b0;
double d1 = (double) y + ((double) j1 + 0.5D) / (double) b0;
double d2 = (double) z + ((double) k1 + 0.5D) / (double) b0;
EntityDiggingFX fx = (new EntityDiggingFX( world, d0, d1, d2, d0 - (double) x - 0.5D, d1 - (double) y - 0.5D, d2 - (double) z
double d0 = x + (i1 + 0.5D) / b0;
double d1 = y + (j1 + 0.5D) / b0;
double d2 = z + (k1 + 0.5D) / b0;
EntityDiggingFX fx = (new EntityDiggingFX( world, d0, d1, d2, d0 - x - 0.5D, d1 - y - 0.5D, d2 - z
- 0.5D, this, meta )).applyColourMultiplier( x, y, z );
fx.setParticleIcon( ico );
@@ -4,7 +4,6 @@ import java.util.EnumSet;
import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.world.World;
import appeng.client.render.effects.VibrantFX;
import appeng.core.AEConfig;
@@ -32,13 +31,13 @@ public class BlockQuartzLamp extends BlockQuartzGlass
if ( CommonHelper.proxy.shouldAddParticles( r ) )
{
double d0 = (double) (r.nextFloat() - 0.5F) * 0.96D;
double d1 = (double) (r.nextFloat() - 0.5F) * 0.96D;
double d2 = (double) (r.nextFloat() - 0.5F) * 0.96D;
double d0 = (r.nextFloat() - 0.5F) * 0.96D;
double d1 = (r.nextFloat() - 0.5F) * 0.96D;
double d2 = (r.nextFloat() - 0.5F) * 0.96D;
VibrantFX fx = new VibrantFX( w, 0.5 + x + d0, 0.5 + y + d1, 0.5 + z + d2, 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
}
@@ -3,7 +3,6 @@ package appeng.block.solids;
import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import appeng.api.AEApi;
@@ -35,9 +34,9 @@ public class OreQuartzCharged extends OreQuartz
if ( !AEConfig.instance.enableEffects )
return;
double xOff = (double) (r.nextFloat());
double yOff = (double) (r.nextFloat());
double zOff = (double) (r.nextFloat());
double xOff = (r.nextFloat());
double yOff = (r.nextFloat());
double zOff = (r.nextFloat());
switch (r.nextInt( 6 ))
{
@@ -67,7 +66,7 @@ public class OreQuartzCharged extends OreQuartz
if ( CommonHelper.proxy.shouldAddParticles( r ) )
{
ChargedOreFX fx = new ChargedOreFX( w, x + xOff, y + yOff, z + zOff, 0.0f, 0.0f, 0.0f );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
}