mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-05 04:49:10 +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();
|
TextureMap map = Minecraft.getMinecraft().getTextureMapBlocks();
|
||||||
this.setParticleTexture(map.getAtlasSprite(TEXTURE.toString()));
|
this.setParticleTexture(map.getAtlasSprite(TEXTURE.toString()));
|
||||||
|
|
||||||
this.particleAlpha = 0.75F;
|
this.particleAlpha = 1F;
|
||||||
this.particleScale = this.desiredScale;
|
this.particleScale = 0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -56,8 +56,11 @@ public class ParticleMagic extends Particle {
|
||||||
|
|
||||||
if (this.fade) {
|
if (this.fade) {
|
||||||
float lifeRatio = (float) this.particleAge / (float) this.particleMaxAge;
|
float lifeRatio = (float) this.particleAge / (float) this.particleMaxAge;
|
||||||
this.particleAlpha = 0.75F - (lifeRatio * 0.75F);
|
this.particleAlpha = 1F - lifeRatio * 0.75F;
|
||||||
this.particleScale = this.desiredScale - (this.desiredScale * lifeRatio);
|
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