final variables and parameters
This commit is contained in:
@@ -37,7 +37,7 @@ public class AssemblerFX extends EntityFX
|
||||
final float speed;
|
||||
float time = 0;
|
||||
|
||||
public AssemblerFX( World w, double x, double y, double z, double r, double g, double b, float speed, IAEItemStack is )
|
||||
public AssemblerFX( final World w, final double x, final double y, final double z, final double r, final double g, final double b, final float speed, final IAEItemStack is )
|
||||
{
|
||||
super( w, x, y, z, r, g, b );
|
||||
this.motionX = 0;
|
||||
@@ -52,9 +52,9 @@ public class AssemblerFX extends EntityFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBrightnessForRender( float par1 )
|
||||
public int getBrightnessForRender( final float par1 )
|
||||
{
|
||||
int j1 = 13;
|
||||
final int j1 = 13;
|
||||
return j1 << 20 | j1 << 4;
|
||||
}
|
||||
|
||||
@@ -69,13 +69,13 @@ public class AssemblerFX extends EntityFX
|
||||
}
|
||||
else
|
||||
{
|
||||
float lifeSpan = (float) this.particleAge / (float) this.particleMaxAge;
|
||||
final float lifeSpan = (float) this.particleAge / (float) this.particleMaxAge;
|
||||
this.fi.setProgress( lifeSpan );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(WorldRenderer par1Tessellator, Entity p_180434_2_, float l, float rX, float rY, float rZ, float rYZ, float rXY )
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
{
|
||||
this.time += l;
|
||||
if( this.time > 4.0 )
|
||||
|
||||
@@ -26,13 +26,13 @@ import net.minecraft.world.World;
|
||||
public class ChargedOreFX extends EntityReddustFX
|
||||
{
|
||||
|
||||
public ChargedOreFX( World w, double x, double y, double z, float r, float g, float b )
|
||||
public ChargedOreFX( final World w, final double x, final double y, final double z, final float r, final float g, final float b )
|
||||
{
|
||||
super( w, x, y, z, 0.21f, 0.61f, 1.0f );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBrightnessForRender( float par1 )
|
||||
public int getBrightnessForRender( final float par1 )
|
||||
{
|
||||
int j1 = super.getBrightnessForRender( par1 );
|
||||
j1 = Math.max( j1 >> 20, j1 >> 4 );
|
||||
|
||||
@@ -42,7 +42,7 @@ public class CraftingFx extends EntityBreakingFX
|
||||
private final int startBlkY;
|
||||
private final int startBlkZ;
|
||||
|
||||
public CraftingFx( World par1World, double par2, double par4, double par6, Item par8Item )
|
||||
public CraftingFx( final World par1World, final double par2, final double par4, final double par6, final Item par8Item )
|
||||
{
|
||||
super( par1World, par2, par4, par6, par8Item );
|
||||
this.particleGravity = 0;
|
||||
@@ -68,26 +68,26 @@ public class CraftingFx extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(WorldRenderer par1Tessellator, Entity p_180434_2_, float partialTick, float x, float y, float z, float rx, float rz)
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float partialTick, final float x, final float y, final float z, final float rx, final float rz)
|
||||
{
|
||||
if( partialTick < 0 || partialTick > 1 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
float f6 = this.particleTextureIndex.getMinU();
|
||||
float f7 = this.particleTextureIndex.getMaxU();
|
||||
float f8 = this.particleTextureIndex.getMinV();
|
||||
float f9 = this.particleTextureIndex.getMaxV();
|
||||
float scale = 0.1F * this.particleScale;
|
||||
final float f6 = this.particleTextureIndex.getMinU();
|
||||
final float f7 = this.particleTextureIndex.getMaxU();
|
||||
final float f8 = this.particleTextureIndex.getMinV();
|
||||
final float f9 = this.particleTextureIndex.getMaxV();
|
||||
final float scale = 0.1F * this.particleScale;
|
||||
|
||||
float offX = (float) ( this.prevPosX + ( this.posX - this.prevPosX ) * partialTick );
|
||||
float offY = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * partialTick );
|
||||
float offZ = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * partialTick );
|
||||
|
||||
int blkX = MathHelper.floor_double( offX );
|
||||
int blkY = MathHelper.floor_double( offY );
|
||||
int blkZ = MathHelper.floor_double( offZ );
|
||||
final int blkX = MathHelper.floor_double( offX );
|
||||
final int blkY = MathHelper.floor_double( offY );
|
||||
final int blkZ = MathHelper.floor_double( offZ );
|
||||
if( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
|
||||
{
|
||||
offX -= interpPosX;
|
||||
@@ -95,7 +95,7 @@ public class CraftingFx extends EntityBreakingFX
|
||||
offZ -= interpPosZ;
|
||||
|
||||
// AELog.info( "" + partialTick );
|
||||
float f14 = 1.0F;
|
||||
final float f14 = 1.0F;
|
||||
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
|
||||
par1Tessellator.addVertexWithUV( offX - x * scale - rx * scale, offY - y * scale, offZ - z * scale - rz * scale, f7, f9 );
|
||||
par1Tessellator.addVertexWithUV( offX - x * scale + rx * scale, offY + y * scale, offZ - z * scale + rz * scale, f7, f8 );
|
||||
@@ -104,7 +104,7 @@ public class CraftingFx extends EntityBreakingFX
|
||||
}
|
||||
}
|
||||
|
||||
public void fromItem( AEPartLocation d )
|
||||
public void fromItem( final AEPartLocation d )
|
||||
{
|
||||
this.posX += 0.2 * d.xOffset;
|
||||
this.posY += 0.2 * d.yOffset;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class EnergyFx extends EntityBreakingFX
|
||||
private final int startBlkY;
|
||||
private final int startBlkZ;
|
||||
|
||||
public EnergyFx( World par1World, double par2, double par4, double par6, Item par8Item )
|
||||
public EnergyFx( final World par1World, final double par2, final double par4, final double par6, final Item par8Item )
|
||||
{
|
||||
super( par1World, par2, par4, par6, par8Item );
|
||||
this.particleGravity = 0;
|
||||
@@ -67,25 +67,25 @@ public class EnergyFx extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(WorldRenderer par1Tessellator, Entity p_180434_2_, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7)
|
||||
{
|
||||
float f6 = this.particleTextureIndex.getMinU();
|
||||
float f7 = this.particleTextureIndex.getMaxU();
|
||||
float f8 = this.particleTextureIndex.getMinV();
|
||||
float f9 = this.particleTextureIndex.getMaxV();
|
||||
float f10 = 0.1F * this.particleScale;
|
||||
final float f6 = this.particleTextureIndex.getMinU();
|
||||
final float f7 = this.particleTextureIndex.getMaxU();
|
||||
final float f8 = this.particleTextureIndex.getMinV();
|
||||
final float f9 = this.particleTextureIndex.getMaxV();
|
||||
final float f10 = 0.1F * this.particleScale;
|
||||
|
||||
float f11 = (float) ( this.prevPosX + ( this.posX - this.prevPosX ) * par2 - interpPosX );
|
||||
float f12 = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * par2 - interpPosY );
|
||||
float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
|
||||
final float f11 = (float) ( this.prevPosX + ( this.posX - this.prevPosX ) * par2 - interpPosX );
|
||||
final float f12 = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * par2 - interpPosY );
|
||||
final float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
|
||||
|
||||
int blkX = MathHelper.floor_double( this.posX );
|
||||
int blkY = MathHelper.floor_double( this.posY );
|
||||
int blkZ = MathHelper.floor_double( this.posZ );
|
||||
final int blkX = MathHelper.floor_double( this.posX );
|
||||
final int blkY = MathHelper.floor_double( this.posY );
|
||||
final int blkZ = MathHelper.floor_double( this.posZ );
|
||||
|
||||
if( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
|
||||
{
|
||||
float f14 = 1.0F;
|
||||
final float f14 = 1.0F;
|
||||
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
|
||||
par1Tessellator.addVertexWithUV( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10, f7, f9 );
|
||||
par1Tessellator.addVertexWithUV( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10, f7, f8 );
|
||||
@@ -94,7 +94,7 @@ public class EnergyFx extends EntityBreakingFX
|
||||
}
|
||||
}
|
||||
|
||||
public void fromItem( AEPartLocation d )
|
||||
public void fromItem( final AEPartLocation d )
|
||||
{
|
||||
this.posX += 0.2 * d.xOffset;
|
||||
this.posY += 0.2 * d.yOffset;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class LightningArcFX extends LightningFX
|
||||
final double ry;
|
||||
final double rz;
|
||||
|
||||
public LightningArcFX( World w, double x, double y, double z, double ex, double ey, double ez, double r, double g, double b )
|
||||
public LightningArcFX( final World w, final double x, final double y, final double z, final double ex, final double ey, final double ez, final double r, final double g, final double b )
|
||||
{
|
||||
super( w, x, y, z, r, g, b, 6 );
|
||||
this.noClip = true;
|
||||
@@ -47,12 +47,12 @@ public class LightningArcFX extends LightningFX
|
||||
@Override
|
||||
protected void regen()
|
||||
{
|
||||
double i = 1.0 / ( this.steps - 1 );
|
||||
double lastDirectionX = this.rx * i;
|
||||
double lastDirectionY = this.ry * i;
|
||||
double lastDirectionZ = this.rz * i;
|
||||
final double i = 1.0 / ( this.steps - 1 );
|
||||
final double lastDirectionX = this.rx * i;
|
||||
final double lastDirectionY = this.ry * i;
|
||||
final double lastDirectionZ = this.rz * i;
|
||||
|
||||
double len = Math.sqrt( lastDirectionX * lastDirectionX + lastDirectionY * lastDirectionY + lastDirectionZ * lastDirectionZ );
|
||||
final double len = Math.sqrt( lastDirectionX * lastDirectionX + lastDirectionY * lastDirectionY + lastDirectionZ * lastDirectionZ );
|
||||
for( int s = 0; s < this.steps; s++ )
|
||||
{
|
||||
this.Steps[s][0] = ( lastDirectionX + ( RANDOM_GENERATOR.nextDouble() - 0.5 ) * len * 1.2 ) / 2.0;
|
||||
|
||||
@@ -41,13 +41,13 @@ public class LightningFX extends EntityFX
|
||||
float currentPoint = 0;
|
||||
boolean hasData = false;
|
||||
|
||||
public LightningFX( World w, double x, double y, double z, double r, double g, double b )
|
||||
public LightningFX( final World w, final double x, final double y, final double z, final double r, final double g, final double b )
|
||||
{
|
||||
this( w, x, y, z, r, g, b, 6 );
|
||||
this.regen();
|
||||
}
|
||||
|
||||
protected LightningFX( World w, double x, double y, double z, double r, double g, double b, int maxAge )
|
||||
protected LightningFX( final World w, final double x, final double y, final double z, final double r, final double g, final double b, final int maxAge )
|
||||
{
|
||||
super( w, x, y, z, r, g, b );
|
||||
this.Steps = new double[this.steps][3];
|
||||
@@ -77,39 +77,39 @@ public class LightningFX extends EntityFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBrightnessForRender( float par1 )
|
||||
public int getBrightnessForRender( final float par1 )
|
||||
{
|
||||
int j1 = 13;
|
||||
final int j1 = 13;
|
||||
return j1 << 20 | j1 << 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(WorldRenderer tess, Entity p_180434_2_, float l, float rX, float rY, float rZ, float rYZ, float rXY )
|
||||
public void renderParticle( final WorldRenderer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
{
|
||||
float j = 1.0f;
|
||||
final float j = 1.0f;
|
||||
tess.setColorRGBA_F( this.particleRed * j * 0.9f, this.particleGreen * j * 0.95f, this.particleBlue * j, this.particleAlpha );
|
||||
if( this.particleAge == 3 )
|
||||
{
|
||||
this.regen();
|
||||
}
|
||||
double f6 = this.particleTextureIndexX / 16.0;
|
||||
double f7 = f6 + 0.0324375F;
|
||||
final double f7 = f6 + 0.0324375F;
|
||||
double f8 = this.particleTextureIndexY / 16.0;
|
||||
double f9 = f8 + 0.0324375F;
|
||||
final double f9 = f8 + 0.0324375F;
|
||||
|
||||
f6 = f7;
|
||||
f8 = f9;
|
||||
|
||||
double scale = 0.02;// 0.02F * this.particleScale;
|
||||
|
||||
double[] a = new double[3];
|
||||
double[] b = new double[3];
|
||||
final double[] a = new double[3];
|
||||
final double[] b = new double[3];
|
||||
|
||||
double ox = 0;
|
||||
double oy = 0;
|
||||
double oz = 0;
|
||||
|
||||
EntityPlayer p = Minecraft.getMinecraft().thePlayer;
|
||||
final EntityPlayer p = Minecraft.getMinecraft().thePlayer;
|
||||
double offX = -rZ;
|
||||
double offY = MathHelper.cos( (float) ( Math.PI / 2.0f + p.rotationPitch * 0.017453292F ) );
|
||||
double offZ = rX;
|
||||
@@ -143,13 +143,13 @@ public class LightningFX extends EntityFX
|
||||
|
||||
for( int s = 0; s < this.steps; s++ )
|
||||
{
|
||||
double xN = x + this.Steps[s][0];
|
||||
double yN = y + this.Steps[s][1];
|
||||
double zN = z + this.Steps[s][2];
|
||||
final double xN = x + this.Steps[s][0];
|
||||
final double yN = y + this.Steps[s][1];
|
||||
final double zN = z + this.Steps[s][2];
|
||||
|
||||
double xD = xN - x;
|
||||
double yD = yN - y;
|
||||
double zD = zN - z;
|
||||
final double xD = xN - x;
|
||||
final double yD = yN - y;
|
||||
final double zD = zN - z;
|
||||
|
||||
if( cycle == 0 )
|
||||
{
|
||||
@@ -170,7 +170,7 @@ public class LightningFX extends EntityFX
|
||||
oz = ( xD * 0 ) - ( 1 * yD );
|
||||
}
|
||||
|
||||
double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ( ( ( (double) this.steps - (double) s ) / this.steps ) * scale );
|
||||
final double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ( ( ( (double) this.steps - (double) s ) / this.steps ) * scale );
|
||||
ox /= ss;
|
||||
oy /= ss;
|
||||
oz /= ss;
|
||||
@@ -202,7 +202,7 @@ public class LightningFX extends EntityFX
|
||||
this.hasData = false;
|
||||
}
|
||||
|
||||
private void draw( WorldRenderer tess, double[] a, double[] b, double f6, double f8 )
|
||||
private void draw( final WorldRenderer tess, final double[] a, final double[] b, final double f6, final double f8 )
|
||||
{
|
||||
if( this.hasData )
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
|
||||
private final TextureAtlasSprite particleTextureIndex;
|
||||
|
||||
public MatterCannonFX( World par1World, double par2, double par4, double par6, Item par8Item )
|
||||
public MatterCannonFX( final World par1World, final double par2, final double par4, final double par6, final Item par8Item )
|
||||
{
|
||||
super( par1World, par2, par4, par6, par8Item );
|
||||
this.particleGravity = 0;
|
||||
@@ -50,7 +50,7 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
public void fromItem( AEPartLocation d )
|
||||
public void fromItem( final AEPartLocation d )
|
||||
{
|
||||
this.particleScale *= 1.2f;
|
||||
}
|
||||
@@ -70,18 +70,18 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(WorldRenderer par1Tessellator, Entity p_180434_2_, float par2, float par3, float par4, float par5, float par6, float par7 )
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
{
|
||||
float f6 = this.particleTextureIndex.getMinU();
|
||||
float f7 = this.particleTextureIndex.getMaxU();
|
||||
float f8 = this.particleTextureIndex.getMinV();
|
||||
float f9 = this.particleTextureIndex.getMaxV();
|
||||
float f10 = 0.05F * this.particleScale;
|
||||
final float f6 = this.particleTextureIndex.getMinU();
|
||||
final float f7 = this.particleTextureIndex.getMaxU();
|
||||
final float f8 = this.particleTextureIndex.getMinV();
|
||||
final float f9 = this.particleTextureIndex.getMaxV();
|
||||
final float f10 = 0.05F * this.particleScale;
|
||||
|
||||
float f11 = (float) ( this.prevPosX + ( this.posX - this.prevPosX ) * par2 - interpPosX );
|
||||
float f12 = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * par2 - interpPosY );
|
||||
float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
|
||||
float f14 = 1.0F;
|
||||
final float f11 = (float) ( this.prevPosX + ( this.posX - this.prevPosX ) * par2 - interpPosX );
|
||||
final float f12 = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * par2 - interpPosY );
|
||||
final float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
|
||||
final float f14 = 1.0F;
|
||||
|
||||
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
|
||||
par1Tessellator.addVertexWithUV( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10, f7, f9 );
|
||||
|
||||
@@ -29,10 +29,10 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
public class VibrantFX extends EntityFX
|
||||
{
|
||||
|
||||
public VibrantFX( World par1World, double x, double y, double z, double par8, double par10, double par12 )
|
||||
public VibrantFX( final World par1World, final double x, final double y, final double z, final double par8, final double par10, final double par12 )
|
||||
{
|
||||
super( par1World, x, y, z, par8, par10, par12 );
|
||||
float f = this.rand.nextFloat() * 0.1F + 0.8F;
|
||||
final float f = this.rand.nextFloat() * 0.1F + 0.8F;
|
||||
this.particleRed = f * 0.7f;
|
||||
this.particleGreen = f * 0.89f;
|
||||
this.particleBlue = f * 0.9f;
|
||||
@@ -50,7 +50,7 @@ public class VibrantFX extends EntityFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBrightness( float par1 )
|
||||
public float getBrightness( final float par1 )
|
||||
{
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user