package net.minecraft.client.particle; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.core.particles.SimpleParticleType; import net.minecraft.util.RandomSource; public class TotemParticle extends SimpleAnimatedParticle { private TotemParticle( final ClientLevel level, final double x, final double y, final double z, final double xa, final double ya, final double za, final SpriteSet sprites ) { super(level, x, y, z, sprites, 1.25F); this.friction = 0.6F; this.xd = xa; this.yd = ya; this.zd = za; this.quadSize *= 0.75F; this.lifetime = 60 + this.random.nextInt(12); this.setSpriteFromAge(sprites); if (this.random.nextInt(4) == 0) { this.setColor(0.6F + this.random.nextFloat() * 0.2F, 0.6F + this.random.nextFloat() * 0.3F, this.random.nextFloat() * 0.2F); } else { this.setColor(0.1F + this.random.nextFloat() * 0.2F, 0.4F + this.random.nextFloat() * 0.3F, this.random.nextFloat() * 0.2F); } } public static class Provider implements ParticleProvider { private final SpriteSet sprites; public Provider(final SpriteSet sprites) { this.sprites = sprites; } public Particle createParticle( final SimpleParticleType options, final ClientLevel level, final double x, final double y, final double z, final double xAux, final double yAux, final double zAux, final RandomSource random ) { return new TotemParticle(level, x, y, z, xAux, yAux, zAux, this.sprites); } } }