mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-28 07:37:58 +01:00
Fixed magic particles not using the correct colours
This commit is contained in:
parent
df2706cfc6
commit
9460957c56
1 changed files with 24 additions and 13 deletions
|
@ -1,5 +1,7 @@
|
||||||
package com.minelittlepony.unicopia.client.particle;
|
package com.minelittlepony.unicopia.client.particle;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.particle.MagicParticleEffect;
|
||||||
|
|
||||||
import net.minecraft.client.particle.ParticleTextureSheet;
|
import net.minecraft.client.particle.ParticleTextureSheet;
|
||||||
import net.minecraft.client.particle.SpriteBillboardParticle;
|
import net.minecraft.client.particle.SpriteBillboardParticle;
|
||||||
import net.minecraft.client.particle.SpriteProvider;
|
import net.minecraft.client.particle.SpriteProvider;
|
||||||
|
@ -35,6 +37,14 @@ public class MagicParticle extends SpriteBillboardParticle {
|
||||||
colorAlpha = 0.7F;
|
colorAlpha = 0.7F;
|
||||||
colorGreen *= 0.3F;
|
colorGreen *= 0.3F;
|
||||||
|
|
||||||
|
if (effect instanceof MagicParticleEffect) {
|
||||||
|
MagicParticleEffect parameters = (MagicParticleEffect)effect;
|
||||||
|
|
||||||
|
colorRed = parameters.getColor().getX();
|
||||||
|
colorGreen = parameters.getColor().getY();
|
||||||
|
colorBlue = parameters.getColor().getZ();
|
||||||
|
} else {
|
||||||
|
|
||||||
if (random.nextBoolean()) {
|
if (random.nextBoolean()) {
|
||||||
colorBlue *= 0.4F;
|
colorBlue *= 0.4F;
|
||||||
}
|
}
|
||||||
|
@ -51,6 +61,7 @@ public class MagicParticle extends SpriteBillboardParticle {
|
||||||
colorRed *= 3.9F;
|
colorRed *= 3.9F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ParticleTextureSheet getType() {
|
public ParticleTextureSheet getType() {
|
||||||
|
|
Loading…
Reference in a new issue