Some additional fixes from other branch.

This commit is contained in:
Sebastian Hartte
2020-05-30 22:18:26 +02:00
parent 16d6d55d7f
commit ec3b464655
139 changed files with 1489 additions and 1485 deletions
@@ -22,6 +22,7 @@ package appeng.client.render.effects;
import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.IParticleRenderType;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.entity.Entity;
@@ -55,7 +56,7 @@ public class LightningFX extends Particle
this.motionX = 0;
this.motionY = 0;
this.motionZ = 0;
this.particleMaxAge = maxAge;
this.maxAge = maxAge;
}
protected void regen()
@@ -77,13 +78,19 @@ public class LightningFX extends Particle
}
@Override
public void onUpdate()
public IParticleRenderType getRenderType() {
// TODO: FIXME
return IParticleRenderType.NO_RENDER;
}
@Override
public void tick()
{
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if( this.particleAge++ >= this.particleMaxAge )
if( this.age++ >= this.maxAge )
{
this.setExpired();
}
@@ -104,7 +111,7 @@ public class LightningFX extends Particle
float blue = this.particleBlue * j;
final float alpha = this.particleAlpha;
if( this.particleAge == 3 )
if( this.age == 3 )
{
this.regen();
}
@@ -157,9 +164,9 @@ public class LightningFX extends Particle
{
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;
double x = ( this.prevPosX + ( this.getPosX() - this.prevPosX ) * l - interpPosX ) - offX;
double y = ( this.prevPosY + ( this.getPosY() - this.prevPosY ) * l - interpPosY ) - offY;
double z = ( this.prevPosZ + ( this.getPosZ() - this.prevPosZ ) * l - interpPosZ ) - offZ;
for( int s = 0; s < LightningFX.STEPS; s++ )
{