package ovh.glitchlabs.ornamentum.items;

import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredRegister;
import ovh.glitchlabs.ornamentum.Ornamentum;
import ovh.glitchlabs.ornamentum.blocks.ModBlocks;

import java.util.function.Supplier;

public class ModCreativeModeTabs {
    public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TAB =
            DeferredRegister.create(Registries.CREATIVE_MODE_TAB, Ornamentum.MODID);

    public static final Supplier<CreativeModeTab> ORNAMENTUM_TAB = CREATIVE_MODE_TAB.register("ornamentum_items_tab",
            () -> CreativeModeTab.builder().icon(() -> new ItemStack(ModBlocks.PROGRESS_PRIDE_FLAG.get()))
                    .title(Component.translatable("creativetab.ornamentum.ornamentum"))
                    .displayItems((itemDisplayParameters, output) -> {

                        output.accept(ModBlocks.IRON_SHELF);
                        output.accept(ModBlocks.LINK_BLOCK);
                        output.accept(ModBlocks.FAN_BLOCK);

                        //toys
                        output.accept(ModBlocks.DUCK);
                        output.accept(ModBlocks.BABY_TURTLE);

                        //flagen
                        output.accept(ModBlocks.WHITE_FLAG);
                        output.accept(ModBlocks.ORANGE_FLAG);
                        output.accept(ModBlocks.MAGENTA_FLAG);
                        output.accept(ModBlocks.LIGHT_BLUE_FLAG);
                        output.accept(ModBlocks.YELLOW_FLAG);
                        output.accept(ModBlocks.LIME_FLAG);
                        output.accept(ModBlocks.PINK_FLAG);
                        output.accept(ModBlocks.GRAY_FLAG);
                        output.accept(ModBlocks.LIGHT_GRAY_FLAG);
                        output.accept(ModBlocks.CYAN_FLAG);
                        output.accept(ModBlocks.PURPLE_FLAG);
                        output.accept(ModBlocks.BLUE_FLAG);
                        output.accept(ModBlocks.BROWN_FLAG);
                        output.accept(ModBlocks.GREEN_FLAG);
                        output.accept(ModBlocks.RED_FLAG);
                        output.accept(ModBlocks.BLACK_FLAG);

                        output.accept(ModBlocks.AGENDER_FLAG);
                        output.accept(ModBlocks.AROACE_FLAG);
                        output.accept(ModBlocks.AROMANTIC_FLAG);
                        output.accept(ModBlocks.ASEXUAL_FLAG);
                        output.accept(ModBlocks.BISEXUAL_FLAG);
                        output.accept(ModBlocks.DEMIROMANTIC_FLAG);
                        output.accept(ModBlocks.DEMISEXUAL_FLAG);
                        output.accept(ModBlocks.GAY_MEN_FLAG);
                        output.accept(ModBlocks.GENDERFLUID_FLAG);
                        output.accept(ModBlocks.GENDERQUEER_FLAG);
                        output.accept(ModBlocks.INTERSEX_FLAG);
                        output.accept(ModBlocks.LESBIAN_FLAG);
                        output.accept(ModBlocks.NON_BINARY_FLAG);
                        output.accept(ModBlocks.OMNISEXUAL_FLAG);
                        output.accept(ModBlocks.PANSEXUAL_FLAG);
                        output.accept(ModBlocks.PRIDE_FLAG);
                        output.accept(ModBlocks.PROGRESS_PRIDE_FLAG);
                        output.accept(ModBlocks.TRANS_FLAG);

                        output.accept(ModBlocks.AUSTRIA_FLAG);
                        output.accept(ModBlocks.BOUVET_ISLAND_FLAG);
                        output.accept(ModBlocks.CANADA_FLAG);
                        output.accept(ModBlocks.CHINA_FLAG);
                        output.accept(ModBlocks.DENMARK_FLAG);
                        output.accept(ModBlocks.FINLAND_FLAG);
                        output.accept(ModBlocks.FRANCE_FLAG);
                        output.accept(ModBlocks.GERMANY_FLAG);
                        output.accept(ModBlocks.GREECE_FLAG);
                        output.accept(ModBlocks.HUNGARY_FLAG);
                        output.accept(ModBlocks.ICELAND_FLAG);
                        output.accept(ModBlocks.INDIA_FLAG);
                        output.accept(ModBlocks.IRELAND_FLAG);
                        output.accept(ModBlocks.ITALY_FLAG);
                        output.accept(ModBlocks.JAPAN_FLAG);
                        output.accept(ModBlocks.LATVIA_FLAG);
                        output.accept(ModBlocks.NETHERLANDS_FLAG);
                        output.accept(ModBlocks.SWEDEN_FLAG);
                        output.accept(ModBlocks.SWITZERLAND_FLAG);
                        output.accept(ModBlocks.UNITED_KINGDOM_FLAG);
                        output.accept(ModBlocks.UNITED_STATES_FLAG);

                        // Glow Glass
                        output.accept(ModBlocks.WHITE_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.ORANGE_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.MAGENTA_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.LIGHT_BLUE_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.YELLOW_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.LIME_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.PINK_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.GRAY_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.LIGHT_GRAY_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.CYAN_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.PURPLE_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.BLUE_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.BROWN_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.GREEN_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.RED_GLOW_STAINED_GLASS);
                        output.accept(ModBlocks.BLACK_GLOW_STAINED_GLASS);

                        // Glow Block
                        output.accept(ModBlocks.WHITE_GLOW_BLOCK);
                        output.accept(ModBlocks.ORANGE_GLOW_BLOCK);
                        output.accept(ModBlocks.MAGENTA_GLOW_BLOCK);
                        output.accept(ModBlocks.LIGHT_BLUE_GLOW_BLOCK);
                        output.accept(ModBlocks.YELLOW_GLOW_BLOCK);
                        output.accept(ModBlocks.LIME_GLOW_BLOCK);
                        output.accept(ModBlocks.PINK_GLOW_BLOCK);
                        output.accept(ModBlocks.GRAY_GLOW_BLOCK);
                        output.accept(ModBlocks.LIGHT_GRAY_GLOW_BLOCK);
                        output.accept(ModBlocks.CYAN_GLOW_BLOCK);
                        output.accept(ModBlocks.PURPLE_GLOW_BLOCK);
                        output.accept(ModBlocks.BLUE_GLOW_BLOCK);
                        output.accept(ModBlocks.BROWN_GLOW_BLOCK);
                        output.accept(ModBlocks.GREEN_GLOW_BLOCK);
                        output.accept(ModBlocks.RED_GLOW_BLOCK);
                        output.accept(ModBlocks.BLACK_GLOW_BLOCK);

                        // Glow Block Stairs
                        output.accept(ModBlocks.WHITE_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.ORANGE_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.MAGENTA_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.LIGHT_BLUE_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.YELLOW_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.LIME_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.PINK_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.GRAY_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.LIGHT_GRAY_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.CYAN_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.PURPLE_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.BLUE_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.BROWN_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.GREEN_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.RED_GLOW_BLOCK_STAIRS);
                        output.accept(ModBlocks.BLACK_GLOW_BLOCK_STAIRS);

                        // Glow Block Slabs
                        output.accept(ModBlocks.WHITE_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.ORANGE_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.MAGENTA_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.LIGHT_BLUE_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.YELLOW_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.LIME_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.PINK_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.GRAY_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.LIGHT_GRAY_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.CYAN_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.PURPLE_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.BLUE_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.BROWN_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.GREEN_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.RED_GLOW_BLOCK_SLAB);
                        output.accept(ModBlocks.BLACK_GLOW_BLOCK_SLAB);

                        // Wool Stairs
                        output.accept(ModBlocks.WHITE_WOOL_STAIRS);
                        output.accept(ModBlocks.ORANGE_WOOL_STAIRS);
                        output.accept(ModBlocks.MAGENTA_WOOL_STAIRS);
                        output.accept(ModBlocks.LIGHT_BLUE_WOOL_STAIRS);
                        output.accept(ModBlocks.YELLOW_WOOL_STAIRS);
                        output.accept(ModBlocks.LIME_WOOL_STAIRS);
                        output.accept(ModBlocks.PINK_WOOL_STAIRS);
                        output.accept(ModBlocks.GRAY_WOOL_STAIRS);
                        output.accept(ModBlocks.LIGHT_GRAY_WOOL_STAIRS);
                        output.accept(ModBlocks.CYAN_WOOL_STAIRS);
                        output.accept(ModBlocks.PURPLE_WOOL_STAIRS);
                        output.accept(ModBlocks.BLUE_WOOL_STAIRS);
                        output.accept(ModBlocks.BROWN_WOOL_STAIRS);
                        output.accept(ModBlocks.GREEN_WOOL_STAIRS);
                        output.accept(ModBlocks.RED_WOOL_STAIRS);
                        output.accept(ModBlocks.BLACK_WOOL_STAIRS);

                        // Wool Slabs
                        output.accept(ModBlocks.WHITE_WOOL_SLAB);
                        output.accept(ModBlocks.ORANGE_WOOL_SLAB);
                        output.accept(ModBlocks.MAGENTA_WOOL_SLAB);
                        output.accept(ModBlocks.LIGHT_BLUE_WOOL_SLAB);
                        output.accept(ModBlocks.YELLOW_WOOL_SLAB);
                        output.accept(ModBlocks.LIME_WOOL_SLAB);
                        output.accept(ModBlocks.PINK_WOOL_SLAB);
                        output.accept(ModBlocks.GRAY_WOOL_SLAB);
                        output.accept(ModBlocks.LIGHT_GRAY_WOOL_SLAB);
                        output.accept(ModBlocks.CYAN_WOOL_SLAB);
                        output.accept(ModBlocks.PURPLE_WOOL_SLAB);
                        output.accept(ModBlocks.BLUE_WOOL_SLAB);
                        output.accept(ModBlocks.BROWN_WOOL_SLAB);
                        output.accept(ModBlocks.GREEN_WOOL_SLAB);
                        output.accept(ModBlocks.RED_WOOL_SLAB);
                        output.accept(ModBlocks.BLACK_WOOL_SLAB);

                        // Pool Tiles
                        output.accept(ModBlocks.POOL_TILES);
                        output.accept(ModBlocks.POOL_TILES_STAIRS);
                        output.accept(ModBlocks.POOL_TILES_SLAB);

                        output.accept(ModBlocks.POOL_TILES1);
                        output.accept(ModBlocks.POOL_TILES1_STAIRS);
                        output.accept(ModBlocks.POOL_TILES1_SLAB);

                        // Mesh
                        output.accept(ModBlocks.MESH_IRON);

                        // Colored Bricks
                        output.accept(ModBlocks.WHITE_BRICKS);
                        output.accept(ModBlocks.ORANGE_BRICKS);
                        output.accept(ModBlocks.MAGENTA_BRICKS);
                        output.accept(ModBlocks.LIGHT_BLUE_BRICKS);
                        output.accept(ModBlocks.YELLOW_BRICKS);
                        output.accept(ModBlocks.LIME_BRICKS);
                        output.accept(ModBlocks.PINK_BRICKS);
                        output.accept(ModBlocks.GRAY_BRICKS);
                        output.accept(ModBlocks.LIGHT_GRAY_BRICKS);
                        output.accept(ModBlocks.CYAN_BRICKS);
                        output.accept(ModBlocks.PURPLE_BRICKS);
                        output.accept(ModBlocks.BLUE_BRICKS);
                        output.accept(ModBlocks.BROWN_BRICKS);
                        output.accept(ModBlocks.GREEN_BRICKS);
                        output.accept(ModBlocks.RED_BRICKS);
                        output.accept(ModBlocks.BLACK_BRICKS);

                        // Colored Bricks Stairs
                        output.accept(ModBlocks.WHITE_BRICKS_STAIRS);
                        output.accept(ModBlocks.ORANGE_BRICKS_STAIRS);
                        output.accept(ModBlocks.MAGENTA_BRICKS_STAIRS);
                        output.accept(ModBlocks.LIGHT_BLUE_BRICKS_STAIRS);
                        output.accept(ModBlocks.YELLOW_BRICKS_STAIRS);
                        output.accept(ModBlocks.LIME_BRICKS_STAIRS);
                        output.accept(ModBlocks.PINK_BRICKS_STAIRS);
                        output.accept(ModBlocks.GRAY_BRICKS_STAIRS);
                        output.accept(ModBlocks.LIGHT_GRAY_BRICKS_STAIRS);
                        output.accept(ModBlocks.CYAN_BRICKS_STAIRS);
                        output.accept(ModBlocks.PURPLE_BRICKS_STAIRS);
                        output.accept(ModBlocks.BLUE_BRICKS_STAIRS);
                        output.accept(ModBlocks.BROWN_BRICKS_STAIRS);
                        output.accept(ModBlocks.GREEN_BRICKS_STAIRS);
                        output.accept(ModBlocks.RED_BRICKS_STAIRS);
                        output.accept(ModBlocks.BLACK_BRICKS_STAIRS);

                        // Colored Bricks Slabs
                        output.accept(ModBlocks.WHITE_BRICKS_SLAB);
                        output.accept(ModBlocks.ORANGE_BRICKS_SLAB);
                        output.accept(ModBlocks.MAGENTA_BRICKS_SLAB);
                        output.accept(ModBlocks.LIGHT_BLUE_BRICKS_SLAB);
                        output.accept(ModBlocks.YELLOW_BRICKS_SLAB);
                        output.accept(ModBlocks.LIME_BRICKS_SLAB);
                        output.accept(ModBlocks.PINK_BRICKS_SLAB);
                        output.accept(ModBlocks.GRAY_BRICKS_SLAB);
                        output.accept(ModBlocks.LIGHT_GRAY_BRICKS_SLAB);
                        output.accept(ModBlocks.CYAN_BRICKS_SLAB);
                        output.accept(ModBlocks.PURPLE_BRICKS_SLAB);
                        output.accept(ModBlocks.BLUE_BRICKS_SLAB);
                        output.accept(ModBlocks.BROWN_BRICKS_SLAB);
                        output.accept(ModBlocks.GREEN_BRICKS_SLAB);
                        output.accept(ModBlocks.RED_BRICKS_SLAB);
                        output.accept(ModBlocks.BLACK_BRICKS_SLAB);

                        // Special Bricks
                        output.accept(ModBlocks.AMETIST_BRICKS);
                        output.accept(ModBlocks.PURPUR_BRICKS);
                        output.accept(ModBlocks.SMOOTH_BASALT_BRICKS);
                        output.accept(ModBlocks.POLISHED_ANDESITE_BRICKS);
                        output.accept(ModBlocks.POLISHED_DIORITE_BRICKS);
                        output.accept(ModBlocks.POLISHED_GRANITE_BRICKS);

                        output.accept(ModBlocks.AMETIST_BRICKS_STAIRS);
                        output.accept(ModBlocks.PURPUR_BRICKS_STAIRS);
                        output.accept(ModBlocks.SMOOTH_BASALT_BRICKS_STAIRS);
                        output.accept(ModBlocks.POLISHED_ANDESITE_BRICKS_STAIRS);
                        output.accept(ModBlocks.POLISHED_DIORITE_BRICKS_STAIRS);
                        output.accept(ModBlocks.POLISHED_GRANITE_BRICKS_STAIRS);

                        output.accept(ModBlocks.CRACKED_OBSIDIAN_BRICKS.get());
                        output.accept(ModBlocks.OBSIDIAN_BRICKS.get());
                        output.accept(ModBlocks.OBSIDIAN_TILES.get());
                        output.accept(ModBlocks.POLISHED_OBSIDIAN.get());
                        output.accept(ModBlocks.CRACKED_OBSIDIAN_TILES.get());

                        output.accept(ModBlocks.AMETIST_BRICKS_SLAB);
                        output.accept(ModBlocks.PURPUR_BRICKS_SLAB);
                        output.accept(ModBlocks.SMOOTH_BASALT_BRICKS_SLAB);
                        output.accept(ModBlocks.POLISHED_ANDESITE_BRICKS_SLAB);
                        output.accept(ModBlocks.POLISHED_DIORITE_BRICKS_SLAB);
                        output.accept(ModBlocks.POLISHED_GRANITE_BRICKS_SLAB);

                        // Pattern Block
                        output.accept(ModBlocks.WHITE_PATTERN_BLOCK);
                        output.accept(ModBlocks.ORANGE_PATTERN_BLOCK);
                        output.accept(ModBlocks.MAGENTA_PATTERN_BLOCK);
                        output.accept(ModBlocks.LIGHT_BLUE_PATTERN_BLOCK);
                        output.accept(ModBlocks.YELLOW_PATTERN_BLOCK);
                        output.accept(ModBlocks.LIME_PATTERN_BLOCK);
                        output.accept(ModBlocks.PINK_PATTERN_BLOCK);
                        output.accept(ModBlocks.GRAY_PATTERN_BLOCK);
                        output.accept(ModBlocks.LIGHT_GRAY_PATTERN_BLOCK);
                        output.accept(ModBlocks.CYAN_PATTERN_BLOCK);
                        output.accept(ModBlocks.PURPLE_PATTERN_BLOCK);
                        output.accept(ModBlocks.BLUE_PATTERN_BLOCK);
                        output.accept(ModBlocks.BROWN_PATTERN_BLOCK);
                        output.accept(ModBlocks.GREEN_PATTERN_BLOCK);
                        output.accept(ModBlocks.RED_PATTERN_BLOCK);
                        output.accept(ModBlocks.BLACK_PATTERN_BLOCK);

                        // Pattern Block Stairs
                        output.accept(ModBlocks.WHITE_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.ORANGE_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.MAGENTA_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.LIGHT_BLUE_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.YELLOW_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.LIME_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.PINK_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.GRAY_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.LIGHT_GRAY_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.CYAN_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.PURPLE_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.BLUE_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.BROWN_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.GREEN_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.RED_PATTERN_BLOCK_STAIRS);
                        output.accept(ModBlocks.BLACK_PATTERN_BLOCK_STAIRS);

                        // Pattern Block Slabs
                        output.accept(ModBlocks.WHITE_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.ORANGE_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.MAGENTA_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.LIGHT_BLUE_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.YELLOW_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.LIME_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.PINK_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.GRAY_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.LIGHT_GRAY_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.CYAN_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.PURPLE_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.BLUE_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.BROWN_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.GREEN_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.RED_PATTERN_BLOCK_SLAB);
                        output.accept(ModBlocks.BLACK_PATTERN_BLOCK_SLAB);

                        // Grates
                        output.accept(ModBlocks.IRON_GRATE);
                        output.accept(ModBlocks.GOLD_GRATE);
                        output.accept(ModBlocks.DIAMOND_GRATE);
                        output.accept(ModBlocks.NETHERITE_GRATE);
                        output.accept(ModBlocks.AMETHYST_GRATE);
                        output.accept(ModBlocks.OBSIDIAN_GRATE);

                        output.accept(ModItems.OBSIDIAN_DUST.get());



                    }).build());


    public static void register(IEventBus eventBus) {
        CREATIVE_MODE_TAB.register(eventBus);
    }
}