package com.acethewildfire.acesbs.effect;

import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.effect.StatusEffect;
import net.minecraft.entity.effect.StatusEffectCategory;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.text.Text;

public class LemonEffect extends StatusEffect {
    public LemonEffect(StatusEffectCategory category, int color) {
        super(category, color);
    }

    @Override
    public Text getName() {
        return Text.translatable(this.getTranslationKey());
    }

    @Override
    public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) {

        entity.damage(world, entity.getDamageSources().wither(), 0.1F);
        return true;

    }

    @Override
    public boolean canApplyUpdateEffect(int duration, int amplifier) {
        return true;
    }

}
