Second update pass (2/3) - 82 -> 0 errors

Second update pass which fixes all compile errors. Some parts may have
aftermath effect, hence why 3rd pass will check those maked with
"aftermath".
Errors: 82 -> 0. Mod can be launched.
This commit is contained in:
elix-x
2016-06-21 11:03:10 +02:00
parent 5498eb6d7c
commit 05aa6972c4
83 changed files with 564 additions and 405 deletions
@@ -28,9 +28,10 @@ import appeng.api.storage.data.IAEItemStack;
import appeng.client.EffectType;
import appeng.core.CommonHelper;
import appeng.entity.EntityFloatingItem;
import appeng.entity.ICanDie;
public class AssemblerFX extends Particle
public class AssemblerFX extends Particle implements ICanDie
{
private final EntityFloatingItem fi;
@@ -47,8 +48,12 @@ public class AssemblerFX extends Particle
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;
//TODO 1.9.4 - noClip => ?
this.noClip = true;
}
@Override
public boolean isDead()
{
return isExpired;
}
@Override
@@ -61,7 +66,20 @@ public class AssemblerFX extends Particle
@Override
public void onUpdate()
{
super.onUpdate();
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setExpired();
}
this.motionY -= 0.04D * (double)this.particleGravity;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
if( this.isExpired )
{
@@ -58,9 +58,6 @@ public class CraftingFx extends ParticleBreaking
this.startBlkX = MathHelper.floor_double( this.posX );
this.startBlkY = MathHelper.floor_double( this.posY );
this.startBlkZ = MathHelper.floor_double( this.posZ );
//TODO 1.9.4 - noClip => ?
this.noClip = true;
}
@Override
@@ -116,7 +113,20 @@ public class CraftingFx extends ParticleBreaking
@Override
public void onUpdate()
{
super.onUpdate();
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setExpired();
}
this.motionY -= 0.04D * (double)this.particleGravity;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
this.particleScale *= 0.51f;
this.particleAlpha *= 0.51f;
}
@@ -57,9 +57,6 @@ public class EnergyFx extends ParticleBreaking
this.startBlkX = MathHelper.floor_double( this.posX );
this.startBlkY = MathHelper.floor_double( this.posY );
this.startBlkZ = MathHelper.floor_double( this.posZ );
//TODO 1.9.4 - noClip => ?
this.noClip = true;
}
@Override
@@ -106,9 +103,23 @@ public class EnergyFx extends ParticleBreaking
@Override
public void onUpdate()
{
super.onUpdate();
this.particleScale *= 0.89f;
this.particleAlpha *= 0.89f;
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setExpired();
}
this.motionY -= 0.04D * (double)this.particleGravity;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
this.particleScale *= 0.89f;
this.particleAlpha *= 0.89f;
}
public void setMotionX( float motionX )
@@ -35,8 +35,6 @@ public class LightningArcFX extends LightningFX
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 );
//TODO 1.9.4 - noClip => ?
this.noClip = true;
this.rx = ex - x;
this.ry = ey - y;
@@ -55,8 +55,6 @@ public class LightningFX extends Particle
this.motionY = 0;
this.motionZ = 0;
this.particleMaxAge = maxAge;
//TODO 1.9.4 - noClip => ?
this.noClip = true;
}
protected void regen()
@@ -83,6 +81,25 @@ public class LightningFX extends Particle
final int j1 = 13;
return j1 << 20 | j1 << 4;
}
@Override
public void onUpdate()
{
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setExpired();
}
this.motionY -= 0.04D * (double)this.particleGravity;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
}
@Override
public void renderParticle( final VertexBuffer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
@@ -48,8 +48,6 @@ public class MatterCannonFX extends ParticleBreaking
this.motionY = 0.0f;
this.motionZ = 0.0f;
this.particleTextureIndex = ExtraBlockTextures.BlockMatterCannonParticle.getIcon().getAtlas();
//TODO 1.9.4 - noClip => ?
this.noClip = true;
}
public void fromItem( final AEPartLocation d )
@@ -60,7 +58,21 @@ public class MatterCannonFX extends ParticleBreaking
@Override
public void onUpdate()
{
super.onUpdate();
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setExpired();
}
this.motionY -= 0.04D * (double)this.particleGravity;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9800000190734863D;
this.motionY *= 0.9800000190734863D;
this.motionZ *= 0.9800000190734863D;
this.particleScale *= 1.19f;
this.particleAlpha *= 0.59f;
}
@@ -46,8 +46,6 @@ public class VibrantFX extends Particle
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.particleMaxAge = (int) ( 20.0D / ( Math.random() * 0.8D + 0.1D ) );
//TODO 1.9.4 - noClip => ?
this.noClip = true;
}
@Override