Fixed sphere and disk particles not having the right colour when first spawned

This commit is contained in:
Sollace 2022-09-16 21:19:09 +02:00
parent 2a9f19fc9f
commit b83f947488
2 changed files with 1 additions and 2 deletions

View file

@ -77,7 +77,6 @@ public class ShieldSpell extends AbstractSpell {
spawner.addParticle(new SphereParticleEffect(UParticles.SPHERE, getType().getColor(), 0.3F, radius), origin, Vec3d.ZERO);
}).ifPresent(p -> {
p.setAttribute(Attachment.ATTR_RADIUS, radius);
p.setAttribute(Attachment.ATTR_COLOR, getType().getColor());
});
}

View file

@ -45,7 +45,7 @@ public class SphereParticleEffect implements ParticleEffect {
}
public SphereParticleEffect(ParticleType<? extends SphereParticleEffect> type, int tint, float alpha, float rad, Vec3d offset) {
this(type, new Vec3f(Color.r(tint), Color.g(tint), Color.b(tint)), alpha, rad, offset);
this(type, new Vec3f(Color.r(tint) * 255, Color.g(tint) * 255, Color.b(tint) * 255), alpha, rad, offset);
}
public SphereParticleEffect(ParticleType<? extends SphereParticleEffect> type, Vec3f color, float alpha, float rad, Vec3d offset) {