package de.steamwar.lobby.particle.elements.custom;

import de.steamwar.lobby.particle.ParticleElement;
import de.steamwar.lobby.particle.ParticleTickData;
import de.steamwar.lobby.particle.elements.DelegatingParticleElement;

public class NonMoving extends DelegatingParticleElement {

    public NonMoving(ParticleElement particleElement) {
        super(particleElement);
    }

    @Override
    public String attribute() {
        return "PARTICLE_ATTRIBUTE_NON_MOVING";
    }

    @Override
    public void tick(ParticleTickData particleTickData) {
        if (particleTickData.isMoving()) {
            return;
        }
        particleElement.tick(particleTickData);
    }
}
