From 8eec4c23165490bb1c9774603578e00205da49e3 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 28 Jan 2019 20:19:08 +0100 Subject: [PATCH] make particles look a bit better --- .../ellpeck/naturesaura/particles/ParticleMagic.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/particles/ParticleMagic.java b/src/main/java/de/ellpeck/naturesaura/particles/ParticleMagic.java index 0fa7f3f5..55e2b5f1 100644 --- a/src/main/java/de/ellpeck/naturesaura/particles/ParticleMagic.java +++ b/src/main/java/de/ellpeck/naturesaura/particles/ParticleMagic.java @@ -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); } } }