Changed access to use this qualifier
This commit is contained in:
@@ -36,14 +36,14 @@ public class AssemblerFX extends EntityFX
|
||||
|
||||
public AssemblerFX(World w, double x, double y, double z, double r, double g, double b, float speed, IAEItemStack is) {
|
||||
super( w, x, y, z, r, g, b );
|
||||
motionX = 0;
|
||||
motionY = 0;
|
||||
motionZ = 0;
|
||||
item = is;
|
||||
this.motionX = 0;
|
||||
this.motionY = 0;
|
||||
this.motionZ = 0;
|
||||
this.item = is;
|
||||
this.speed = speed;
|
||||
fi = new EntityFloatingItem( this, w, x, y, z, is.getItemStack() );
|
||||
w.spawnEntityInWorld( fi );
|
||||
particleMaxAge = (int) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;
|
||||
this.fi = new EntityFloatingItem( this, w, x, y, z, is.getItemStack() );
|
||||
w.spawnEntityInWorld( this.fi );
|
||||
this.particleMaxAge = (int) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,25 +58,25 @@ public class AssemblerFX extends EntityFX
|
||||
{
|
||||
super.onUpdate();
|
||||
|
||||
if ( isDead )
|
||||
fi.setDead();
|
||||
if ( this.isDead )
|
||||
this.fi.setDead();
|
||||
else
|
||||
{
|
||||
float lifeSpan = (float) this.particleAge / (float) this.particleMaxAge;
|
||||
fi.setProgress( lifeSpan );
|
||||
this.fi.setProgress( lifeSpan );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator tess, float l, float rX, float rY, float rZ, float rYZ, float rXY)
|
||||
{
|
||||
time += l;
|
||||
if ( time > 4.0 )
|
||||
this.time += l;
|
||||
if ( this.time > 4.0 )
|
||||
{
|
||||
time -= 4.0;
|
||||
this.time -= 4.0;
|
||||
// if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
for (int x = 0; x < (int) Math.ceil( speed / 5 ); x++)
|
||||
CommonHelper.proxy.spawnEffect( EffectType.Crafting, worldObj, posX, posY, posZ, null );
|
||||
for (int x = 0; x < (int) Math.ceil( this.speed / 5 ); x++)
|
||||
CommonHelper.proxy.spawnEffect( EffectType.Crafting, this.worldObj, this.posX, this.posY, this.posZ, null );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,18 +47,18 @@ public class CraftingFx extends EntityBreakingFX
|
||||
|
||||
public CraftingFx(World par1World, double par2, double par4, double par6, Item par8Item) {
|
||||
super( par1World, par2, par4, par6, par8Item );
|
||||
particleGravity = 0;
|
||||
this.particleGravity = 0;
|
||||
this.particleBlue = 1;
|
||||
this.particleGreen = 0.9f;
|
||||
this.particleRed = 1;
|
||||
this.particleAlpha = 1.3f;
|
||||
this.particleScale = 1.5f;
|
||||
this.particleTextureIndex = ExtraBlockTextures.BlockEnergyParticle.getIcon();
|
||||
particleMaxAge /= 1.2;
|
||||
this.particleMaxAge /= 1.2;
|
||||
|
||||
startBlkX = MathHelper.floor_double( posX );
|
||||
startBlkY = MathHelper.floor_double( posY );
|
||||
startBlkZ = MathHelper.floor_double( posZ );
|
||||
this.startBlkX = MathHelper.floor_double( this.posX );
|
||||
this.startBlkY = MathHelper.floor_double( this.posY );
|
||||
this.startBlkZ = MathHelper.floor_double( this.posZ );
|
||||
}
|
||||
|
||||
public void fromItem(ForgeDirection d)
|
||||
@@ -97,7 +97,7 @@ public class CraftingFx extends EntityBreakingFX
|
||||
int blkX = MathHelper.floor_double( offX );
|
||||
int blkY = MathHelper.floor_double( offY );
|
||||
int blkZ = MathHelper.floor_double( offZ );
|
||||
if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ )
|
||||
if ( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
|
||||
{
|
||||
offX -= interpPosX;
|
||||
offY -= interpPosY;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class EnergyFx extends EntityBreakingFX
|
||||
|
||||
public EnergyFx(World par1World, double par2, double par4, double par6, Item par8Item) {
|
||||
super( par1World, par2, par4, par6, par8Item );
|
||||
particleGravity = 0;
|
||||
this.particleGravity = 0;
|
||||
this.particleBlue = 255;
|
||||
this.particleGreen = 255;
|
||||
this.particleRed = 255;
|
||||
@@ -55,9 +55,9 @@ public class EnergyFx extends EntityBreakingFX
|
||||
this.particleScale = 3.5f;
|
||||
this.particleTextureIndex = ExtraBlockTextures.BlockEnergyParticle.getIcon();
|
||||
|
||||
startBlkX = MathHelper.floor_double( posX );
|
||||
startBlkY = MathHelper.floor_double( posY );
|
||||
startBlkZ = MathHelper.floor_double( posZ );
|
||||
this.startBlkX = MathHelper.floor_double( this.posX );
|
||||
this.startBlkY = MathHelper.floor_double( this.posY );
|
||||
this.startBlkZ = MathHelper.floor_double( this.posZ );
|
||||
}
|
||||
|
||||
public void fromItem(ForgeDirection d)
|
||||
@@ -90,11 +90,11 @@ public class EnergyFx extends EntityBreakingFX
|
||||
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
|
||||
float f14 = 1.0F;
|
||||
|
||||
int blkX = MathHelper.floor_double( posX );
|
||||
int blkY = MathHelper.floor_double( posY );
|
||||
int blkZ = MathHelper.floor_double( posZ );
|
||||
int blkX = MathHelper.floor_double( this.posX );
|
||||
int blkY = MathHelper.floor_double( this.posY );
|
||||
int blkZ = MathHelper.floor_double( this.posZ );
|
||||
|
||||
if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ )
|
||||
if ( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
|
||||
{
|
||||
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,
|
||||
|
||||
@@ -34,23 +34,23 @@ public class LightningArcFX extends LightningFX
|
||||
this.ry = ey - y;
|
||||
this.rz = ez - z;
|
||||
|
||||
regen();
|
||||
this.regen();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void regen()
|
||||
{
|
||||
double i = 1.0 / (steps - 1);
|
||||
double lastDirectionX = rx * i;
|
||||
double lastDirectionY = ry * i;
|
||||
double lastDirectionZ = rz * i;
|
||||
double i = 1.0 / (this.steps - 1);
|
||||
double lastDirectionX = this.rx * i;
|
||||
double lastDirectionY = this.ry * i;
|
||||
double lastDirectionZ = this.rz * i;
|
||||
|
||||
double len = Math.sqrt( lastDirectionX * lastDirectionX + lastDirectionY * lastDirectionY + lastDirectionZ * lastDirectionZ );
|
||||
for (int s = 0; s < steps; s++)
|
||||
for (int s = 0; s < this.steps; s++)
|
||||
{
|
||||
Steps[s][0] = (lastDirectionX + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
Steps[s][1] = (lastDirectionY + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
Steps[s][2] = (lastDirectionZ + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
this.Steps[s][0] = (lastDirectionX + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
this.Steps[s][1] = (lastDirectionY + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
this.Steps[s][2] = (lastDirectionZ + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,17 +30,17 @@ import net.minecraft.world.World;
|
||||
public class LightningFX extends EntityFX
|
||||
{
|
||||
|
||||
final int steps = getSteps();
|
||||
final int steps = this.getSteps();
|
||||
static final Random rng = new Random();
|
||||
final double[][] Steps;
|
||||
|
||||
protected LightningFX(World w, double x, double y, double z, double r, double g, double b, int maxAge) {
|
||||
super( w, x, y, z, r, g, b );
|
||||
Steps = new double[steps][3];
|
||||
motionX = 0;
|
||||
motionY = 0;
|
||||
motionZ = 0;
|
||||
particleMaxAge = maxAge;
|
||||
this.Steps = new double[this.steps][3];
|
||||
this.motionX = 0;
|
||||
this.motionY = 0;
|
||||
this.motionZ = 0;
|
||||
this.particleMaxAge = maxAge;
|
||||
}
|
||||
|
||||
private int getSteps()
|
||||
@@ -50,7 +50,7 @@ public class LightningFX extends EntityFX
|
||||
|
||||
public LightningFX(World w, double x, double y, double z, double r, double g, double b) {
|
||||
this( w, x, y, z, r, g, b, 6 );
|
||||
regen();
|
||||
this.regen();
|
||||
}
|
||||
|
||||
float currentPoint = 0;
|
||||
@@ -67,11 +67,11 @@ public class LightningFX extends EntityFX
|
||||
double lastDirectionX = (rng.nextDouble() - 0.5) * 0.9;
|
||||
double lastDirectionY = (rng.nextDouble() - 0.5) * 0.9;
|
||||
double lastDirectionZ = (rng.nextDouble() - 0.5) * 0.9;
|
||||
for (int s = 0; s < steps; s++)
|
||||
for (int s = 0; s < this.steps; s++)
|
||||
{
|
||||
Steps[s][0] = lastDirectionX = (lastDirectionX + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
Steps[s][1] = lastDirectionY = (lastDirectionY + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
Steps[s][2] = lastDirectionZ = (lastDirectionZ + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
this.Steps[s][0] = lastDirectionX = (lastDirectionX + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
this.Steps[s][1] = lastDirectionY = (lastDirectionY + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
this.Steps[s][2] = lastDirectionZ = (lastDirectionZ + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,9 +80,9 @@ public class LightningFX extends EntityFX
|
||||
{
|
||||
float j = 1.0f;
|
||||
tess.setColorRGBA_F( this.particleRed * j * 0.9f, this.particleGreen * j * 0.95f, this.particleBlue * j, this.particleAlpha );
|
||||
if ( particleAge == 3 )
|
||||
if ( this.particleAge == 3 )
|
||||
{
|
||||
regen();
|
||||
this.regen();
|
||||
}
|
||||
double f6 = this.particleTextureIndexX / 16.0;
|
||||
double f7 = f6 + 0.0324375F;
|
||||
@@ -127,17 +127,17 @@ public class LightningFX extends EntityFX
|
||||
|
||||
for (int cycle = 0; cycle < 3; cycle++)
|
||||
{
|
||||
clear();
|
||||
this.clear();
|
||||
|
||||
double x = (this.prevPosX + (this.posX - this.prevPosX) * l - interpPosX) - offX;
|
||||
double y = (this.prevPosY + (this.posY - this.prevPosY) * l - interpPosY) - offY;
|
||||
double z = (this.prevPosZ + (this.posZ - this.prevPosZ) * l - interpPosZ) - offZ;
|
||||
|
||||
for (int s = 0; s < steps; s++)
|
||||
for (int s = 0; s < this.steps; s++)
|
||||
{
|
||||
double xN = x + Steps[s][0];
|
||||
double yN = y + Steps[s][1];
|
||||
double zN = z + Steps[s][2];
|
||||
double xN = x + this.Steps[s][0];
|
||||
double yN = y + this.Steps[s][1];
|
||||
double zN = z + this.Steps[s][2];
|
||||
|
||||
double xD = xN - x;
|
||||
double yD = yN - y;
|
||||
@@ -162,7 +162,7 @@ public class LightningFX extends EntityFX
|
||||
oz = (xD * 0) - (1 * yD);
|
||||
}
|
||||
|
||||
double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ((((double) steps - (double) s) / steps) * scale);
|
||||
double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ((((double) this.steps - (double) s) / this.steps) * scale);
|
||||
ox /= ss;
|
||||
oy /= ss;
|
||||
oz /= ss;
|
||||
@@ -175,7 +175,7 @@ public class LightningFX extends EntityFX
|
||||
b[1] = y;
|
||||
b[2] = z;
|
||||
|
||||
draw( tess, a, b, f6, f8 );
|
||||
this.draw( tess, a, b, f6, f8 );
|
||||
|
||||
x = xN;
|
||||
y = yN;
|
||||
@@ -195,23 +195,23 @@ public class LightningFX extends EntityFX
|
||||
|
||||
private void draw(Tessellator tess, double[] a, double[] b, double f6, double f8)
|
||||
{
|
||||
if ( hasData )
|
||||
if ( this.hasData )
|
||||
{
|
||||
tess.addVertexWithUV( a[0], a[1], a[2], f6, f8 );
|
||||
tess.addVertexWithUV( I[0], I[1], I[2], f6, f8 );
|
||||
tess.addVertexWithUV( K[0], K[1], K[2], f6, f8 );
|
||||
tess.addVertexWithUV( this.I[0], this.I[1], this.I[2], f6, f8 );
|
||||
tess.addVertexWithUV( this.K[0], this.K[1], this.K[2], f6, f8 );
|
||||
tess.addVertexWithUV( b[0], b[1], b[2], f6, f8 );
|
||||
}
|
||||
hasData = true;
|
||||
this.hasData = true;
|
||||
for (int x = 0; x < 3; x++)
|
||||
{
|
||||
I[x] = a[x];
|
||||
K[x] = b[x];
|
||||
this.I[x] = a[x];
|
||||
this.K[x] = b[x];
|
||||
}
|
||||
}
|
||||
|
||||
private void clear()
|
||||
{
|
||||
hasData = false;
|
||||
this.hasData = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
|
||||
public MatterCannonFX(World par1World, double par2, double par4, double par6, Item par8Item) {
|
||||
super( par1World, par2, par4, par6, par8Item );
|
||||
particleGravity = 0;
|
||||
this.particleGravity = 0;
|
||||
this.particleBlue = 255;
|
||||
this.particleGreen = 255;
|
||||
this.particleRed = 255;
|
||||
|
||||
Reference in New Issue
Block a user