package com.acethewildfire.acesbs.datagen;

import com.acethewildfire.acesbs.block.ModBlocks;
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.registry.RegistryWrapper;
import net.minecraft.registry.tag.BlockTags;

import java.util.concurrent.CompletableFuture;

public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider {
    public ModBlockTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
        super(output, registriesFuture);
    }

    @Override
    protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) {
        getOrCreateTagBuilder(BlockTags.PICKAXE_MINEABLE)
                .add(ModBlocks.ENTROPY_BLOCK)
                .add(ModBlocks.STABLE_ENTROPY_BLOCK)
                .add(ModBlocks.PRISMA_STEEL_BLOCK)
                .add(ModBlocks.ENTROPY_ORE)
                .add(ModBlocks.DEEPSLATE_ENTROPY_ORE)
                .add(ModBlocks.INFERNAL_ASHES_ORE)
                .add(ModBlocks.ENDTROPY_ORE)
                .add(ModBlocks.ENTROPIC_STABILIZER)
                .add(ModBlocks.ENTROPIC_EVISCERATOR)
                .add(ModBlocks.ENTROPIC_ENTANGLER);
        getOrCreateTagBuilder(BlockTags.NEEDS_IRON_TOOL)
                .add(ModBlocks.INFERNAL_ASHES_ORE);
        getOrCreateTagBuilder(BlockTags.NEEDS_DIAMOND_TOOL)
                .add(ModBlocks.ENTROPY_ORE)
                .add(ModBlocks.DEEPSLATE_ENTROPY_ORE)
                .add(ModBlocks.ENDTROPY_ORE)
                .add(ModBlocks.ENTROPY_BLOCK)
                .add(ModBlocks.STABLE_ENTROPY_BLOCK)
                .add(ModBlocks.PRISMA_STEEL_BLOCK)
                .add(ModBlocks.ENTROPIC_STABILIZER)
                .add(ModBlocks.ENTROPIC_EVISCERATOR)
                .add(ModBlocks.ENTROPIC_ENTANGLER);
        getOrCreateTagBuilder(BlockTags.AXE_MINEABLE)
                .add(ModBlocks.LEMONWOOD_PLANKS)
                .add(ModBlocks.LEMONWOOD_WALL)
                .add(ModBlocks.LEMONWOOD_FENCE)
                .add(ModBlocks.LEMONWOOD_FENCE_GATE);
        getOrCreateTagBuilder(BlockTags.SHOVEL_MINEABLE)
                .add(ModBlocks.INFERNAL_ASHES_BLOCK);
        getOrCreateTagBuilder(BlockTags.WOODEN_FENCES)
                .add(ModBlocks.LEMONWOOD_FENCE);
        getOrCreateTagBuilder(BlockTags.FENCE_GATES)
                .add(ModBlocks.LEMONWOOD_FENCE_GATE);
        getOrCreateTagBuilder(BlockTags.WALLS)
                .add(ModBlocks.LEMONWOOD_WALL);
        getOrCreateTagBuilder(BlockTags.IMPERMEABLE)
                .add(ModBlocks.CRYSTAL_ENTROPY)
                .add(ModBlocks.CRYSTAL_ENTROPY_PANE);
        getOrCreateTagBuilder(ModTags.Blocks.NEEDS_PRISMA_STEEL_TOOL);
//                  Currently Broken
//                .addTag(BlockTags.NEEDS_IRON_TOOL);
        getOrCreateTagBuilder(BlockTags.LOGS_THAT_BURN)
                .add(ModBlocks.LEMONWOOD_LOG)
                .add(ModBlocks.LEMONWOOD_WOOD)
                .add(ModBlocks.STRIPPED_LEMONWOOD_LOG)
                .add(ModBlocks.STRIPPED_LEMONWOOD_WOOD);
    }
}
