package com.acethewildfire.acesbs.datagen;

import com.acethewildfire.acesbs.block.ModBlocks;
import com.acethewildfire.acesbs.item.ModItems;
import com.acethewildfire.acesbs.item.PrismaSteelItems;
import com.acethewildfire.acesbs.util.ModTags;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.minecraft.item.Items;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.ItemTags;

import java.util.concurrent.CompletableFuture;

public class ModItemTagProvider extends FabricTagProvider.ItemTagProvider {

    public ModItemTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> completableFuture) {
        super(output, completableFuture);
    }

    @Override
    protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) {
        getOrCreateTagBuilder(ModTags.Items.ENTROPY_CONVERTABLE)
                .add(Items.APPLE);
        getOrCreateTagBuilder(ModTags.Items.PRISMA_CONVERTABLE)
                .add(Items.COAL)
                .add(Items.RAW_COPPER)
                .add(Items.RAW_IRON)
                .add(Items.RAW_GOLD)
                .add(Items.REDSTONE)
                .add(Items.LAPIS_LAZULI)
                .add(Items.EMERALD)
                .add(Items.DIAMOND);
        getOrCreateTagBuilder(ItemTags.BOW_ENCHANTABLE)
                .add(ModItems.KAUPEN_BOW);
        getOrCreateTagBuilder(ItemTags.SWORDS)
                .add(PrismaSteelItems.PRISMA_STEEL_SWORD);
        getOrCreateTagBuilder(ItemTags.AXES)
                .add(PrismaSteelItems.PRISMA_STEEL_AXE);
        getOrCreateTagBuilder(ItemTags.PICKAXES)
                .add(PrismaSteelItems.PRISMA_STEEL_PICKAXE);
        getOrCreateTagBuilder(ItemTags.SHOVELS)
                .add(PrismaSteelItems.PRISMA_STEEL_SHOVEL);
        getOrCreateTagBuilder(ItemTags.HOES)
                .add(PrismaSteelItems.PRISMA_STEEL_HOE);
        getOrCreateTagBuilder(ItemTags.TRIMMABLE_ARMOR)
                .add(PrismaSteelItems.PRISMA_STEEL_HELMET)
                .add(PrismaSteelItems.PRISMA_STEEL_CHESTPLATE)
                .add(PrismaSteelItems.PRISMA_STEEL_LEGGINGS)
                .add(PrismaSteelItems.PRISMA_STEEL_BOOTS)
                .add(ModItems.BERSERKERS_PAULDRON);
        getOrCreateTagBuilder(ItemTags.TRIM_MATERIALS)
                .add(PrismaSteelItems.PRISMA_STEEL);
        getOrCreateTagBuilder(ItemTags.TRIM_TEMPLATES)
                .add(PrismaSteelItems.PRISMA_SMITHING_TEMPLATE);
        getOrCreateTagBuilder(ItemTags.CREEPER_DROP_MUSIC_DISCS)
                .add(ModItems.CRAB_RAVE_MUSIC_DISC);
        getOrCreateTagBuilder(ItemTags.LOGS_THAT_BURN)
                .add(ModBlocks.LEMONWOOD_LOG.asItem())
                .add(ModBlocks.LEMONWOOD_WOOD.asItem())
                .add(ModBlocks.STRIPPED_LEMONWOOD_LOG.asItem())
                .add(ModBlocks.STRIPPED_LEMONWOOD_WOOD.asItem());
        getOrCreateTagBuilder(ItemTags.PLANKS)
                .add(ModBlocks.LEMONWOOD_PLANKS.asItem());
    }
}
