package net.minecraft.client.particle;

import net.minecraft.core.particles.ParticleOptions;
import net.minecraft.core.particles.SimpleParticleType;
import net.minecraft.client.multiplayer.ClientLevel;

public class SoulParticle extends RisingParticle {
    private final SpriteSet sprites;
    
    private SoulParticle(final ClientLevel dym, final double double2, final double double3, final double double4, final double double5, final double double6, final double double7, final SpriteSet eap) {
        super(dym, double2, double3, double4, double5, double6, double7);
        this.sprites = eap;
        this.scale(1.5f);
        this.setSpriteFromAge(eap);
    }
    
    @Override
    public ParticleRenderType getRenderType() {
        return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT;
    }
    
    @Override
    public void tick() {
        super.tick();
        if (!this.removed) {
            this.setSpriteFromAge(this.sprites);
        }
    }
    
    public static class Provider implements ParticleProvider<SimpleParticleType> {
        private final SpriteSet sprite;
        
        public Provider(final SpriteSet eap) {
            this.sprite = eap;
        }
        
        @Override
        public Particle createParticle(final SimpleParticleType hi, final ClientLevel dym, final double double3, final double double4, final double double5, final double double6, final double double7, final double double8) {
            final SoulParticle eal16 = new SoulParticle(dym, double3, double4, double5, double6, double7, double8, this.sprite, null);
            eal16.setAlpha(1.0f);
            eal16.pickSprite(this.sprite);
            return eal16;
        }
    }
}
