mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +01:00
make particles look a bit better
This commit is contained in:
parent
85acdc6ded
commit
8eec4c2316
1 changed files with 7 additions and 4 deletions
|
@ -37,8 +37,8 @@ public class ParticleMagic extends Particle {
|
|||
TextureMap map = Minecraft.getMinecraft().getTextureMapBlocks();
|
||||
this.setParticleTexture(map.getAtlasSprite(TEXTURE.toString()));
|
||||
|
||||
this.particleAlpha = 0.75F;
|
||||
this.particleScale = this.desiredScale;
|
||||
this.particleAlpha = 1F;
|
||||
this.particleScale = 0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,8 +56,11 @@ public class ParticleMagic extends Particle {
|
|||
|
||||
if (this.fade) {
|
||||
float lifeRatio = (float) this.particleAge / (float) this.particleMaxAge;
|
||||
this.particleAlpha = 0.75F - (lifeRatio * 0.75F);
|
||||
this.particleScale = this.desiredScale - (this.desiredScale * lifeRatio);
|
||||
this.particleAlpha = 1F - lifeRatio * 0.75F;
|
||||
if (lifeRatio <= 0.25F)
|
||||
this.particleScale = this.desiredScale * (lifeRatio / 0.25F);
|
||||
else
|
||||
this.particleScale = this.desiredScale * (1F - (lifeRatio - 0.25F) / 0.75F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue