package com.acethewildfire.acesbs.enchantment;

import com.acethewildfire.acesbs.AcesBS;
import com.acethewildfire.acesbs.enchantment.custom.LightningStrikeEnchantmentEffect;
import com.mojang.serialization.MapCodec;
import net.minecraft.enchantment.effect.EnchantmentEntityEffect;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;

public class ModEnchantmentEffects {

    public static final MapCodec<? extends EnchantmentEntityEffect> LIGHTNING_STRIKE =
            registerEntityEffect("lighting_strike", LightningStrikeEnchantmentEffect.CODEC);


    private static MapCodec<? extends EnchantmentEntityEffect> registerEntityEffect (String name,
                                                                                     MapCodec<? extends EnchantmentEntityEffect> codec){
        return Registry.register(Registries.ENCHANTMENT_ENTITY_EFFECT_TYPE, Identifier.of(AcesBS.MOD_ID, name), codec);
    }

    public static void registerModEnchantments(){
        AcesBS.LOGGER.info("Registering Mod Enchantment Effects for " + AcesBS.MOD_ID);
    }
}
