Format sourcecode

This commit is contained in:
yueh
2017-07-20 21:17:10 +02:00
parent 66437897be
commit 621910df91
295 changed files with 2142 additions and 1562 deletions
@@ -67,19 +67,19 @@ public class AssemblerFX extends Particle implements ICanDie
public void onUpdate()
{
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setExpired();
}
if( this.particleAge++ >= this.particleMaxAge )
{
this.setExpired();
}
this.motionY -= 0.04D * (double)this.particleGravity;
this.move(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
this.motionY -= 0.04D * (double) this.particleGravity;
this.move( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
if( this.isExpired )
{
@@ -93,16 +93,32 @@ public class CraftingFx extends ParticleBreaking
offY -= interpPosY;
offZ -= interpPosZ;
int i = this.getBrightnessForRender(partialTick);
int i = this.getBrightnessForRender( partialTick );
int j = i >> 16 & 65535;
int k = i & 65535;
// AELog.info( "" + partialTick );
final float f14 = 1.0F;
par1Tessellator.pos( offX - x * scale - rx * scale, offY - y * scale, offZ - z * scale - rz * scale ).tex( f7, f9 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
par1Tessellator.pos( offX - x * scale + rx * scale, offY + y * scale, offZ - z * scale + rz * scale ).tex( f7, f8 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
par1Tessellator.pos( offX + x * scale + rx * scale, offY + y * scale, offZ + z * scale + rz * scale ).tex( f6, f8 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
par1Tessellator.pos( offX + x * scale - rx * scale, offY - y * scale, offZ + z * scale - rz * scale ).tex( f6, f9 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
par1Tessellator.pos( offX - x * scale - rx * scale, offY - y * scale, offZ - z * scale - rz * scale )
.tex( f7, f9 )
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
.lightmap( j, k )
.endVertex();
par1Tessellator.pos( offX - x * scale + rx * scale, offY + y * scale, offZ - z * scale + rz * scale )
.tex( f7, f8 )
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
.lightmap( j, k )
.endVertex();
par1Tessellator.pos( offX + x * scale + rx * scale, offY + y * scale, offZ + z * scale + rz * scale )
.tex( f6, f8 )
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
.lightmap( j, k )
.endVertex();
par1Tessellator.pos( offX + x * scale - rx * scale, offY - y * scale, offZ + z * scale - rz * scale )
.tex( f6, f9 )
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
.lightmap( j, k )
.endVertex();
}
}
@@ -84,15 +84,31 @@ public class EnergyFx extends ParticleBreaking
if( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
{
int i = this.getBrightnessForRender(partialTicks);
int i = this.getBrightnessForRender( partialTicks );
int j = i >> 16 & 65535;
int k = i & 65535;
final float f14 = 1.0F;
par1Tessellator.pos( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10 ).tex( f7, f9 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
par1Tessellator.pos( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10 ).tex( f7, f8 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
par1Tessellator.pos( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10 ).tex( f6, f8 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
par1Tessellator.pos( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10 ).tex( f6, f9 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
par1Tessellator.pos( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10 )
.tex( f7, f9 )
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
.lightmap( j, k )
.endVertex();
par1Tessellator.pos( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10 )
.tex( f7, f8 )
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
.lightmap( j, k )
.endVertex();
par1Tessellator.pos( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10 )
.tex( f6, f8 )
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
.lightmap( j, k )
.endVertex();
par1Tessellator.pos( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10 )
.tex( f6, f9 )
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
.lightmap( j, k )
.endVertex();
}
}
@@ -80,19 +80,19 @@ public class LightningFX extends Particle
public void onUpdate()
{
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setExpired();
}
if( this.particleAge++ >= this.particleMaxAge )
{
this.setExpired();
}
this.motionY -= 0.04D * (double)this.particleGravity;
this.move(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
this.motionY -= 0.04D * (double) this.particleGravity;
this.move( this.motionX, this.motionY, this.motionZ );
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
}
@Override
@@ -190,7 +190,8 @@ public class LightningFX extends Particle
oz = ( xD * 0 ) - ( 1 * yD );
}
final double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ( ( ( (double) LightningFX.STEPS - (double) s ) / LightningFX.STEPS ) * scale );
final double ss = Math
.sqrt( ox * ox + oy * oy + oz * oz ) / ( ( ( (double) LightningFX.STEPS - (double) s ) / LightningFX.STEPS ) * scale );
ox /= ss;
oy /= ss;
oz /= ss;
@@ -227,8 +228,16 @@ public class LightningFX extends Particle
if( this.hasData )
{
tess.pos( a[0], a[1], a[2] ).tex( f6, f8 ).color( red, green, blue, this.particleAlpha ).lightmap( BRIGHTNESS, BRIGHTNESS ).endVertex();
tess.pos( this.vertices[0], this.vertices[1], this.vertices[2] ).tex( f6, f8 ).color( red, green, blue, this.particleAlpha ).lightmap( BRIGHTNESS, BRIGHTNESS ).endVertex();
tess.pos( this.verticesWithUV[0], this.verticesWithUV[1], this.verticesWithUV[2] ).tex( f6, f8 ).color( red, green, blue, this.particleAlpha ).lightmap( BRIGHTNESS, BRIGHTNESS ).endVertex();
tess.pos( this.vertices[0], this.vertices[1], this.vertices[2] )
.tex( f6, f8 )
.color( red, green, blue, this.particleAlpha )
.lightmap( BRIGHTNESS, BRIGHTNESS )
.endVertex();
tess.pos( this.verticesWithUV[0], this.verticesWithUV[1], this.verticesWithUV[2] )
.tex( f6, f8 )
.color( red, green, blue, this.particleAlpha )
.lightmap( BRIGHTNESS, BRIGHTNESS )
.endVertex();
tess.pos( b[0], b[1], b[2] ).tex( f6, f8 ).color( red, green, blue, this.particleAlpha ).lightmap( BRIGHTNESS, BRIGHTNESS ).endVertex();
}
this.hasData = true;
@@ -97,13 +97,29 @@ public class MatterCannonFX extends ParticleBreaking
final float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
final float f14 = 1.0F;
int i = this.getBrightnessForRender(par2);
int i = this.getBrightnessForRender( par2 );
int j = i >> 16 & 65535;
int k = i & 65535;
par1Tessellator.pos( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10 ).tex( f7, f9 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
par1Tessellator.pos( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10 ).tex( f7, f8 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
par1Tessellator.pos( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10 ).tex( f6, f8 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
par1Tessellator.pos( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10 ).tex( f6, f9 ).color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ).lightmap( j, k ).endVertex();
par1Tessellator.pos( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10 )
.tex( f7, f9 )
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
.lightmap( j, k )
.endVertex();
par1Tessellator.pos( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10 )
.tex( f7, f8 )
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
.lightmap( j, k )
.endVertex();
par1Tessellator.pos( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10 )
.tex( f6, f8 )
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
.lightmap( j, k )
.endVertex();
par1Tessellator.pos( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10 )
.tex( f6, f9 )
.color( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha )
.lightmap( j, k )
.endVertex();
}
}