package net.halbear.aotg.registries;

import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.CreativeModeTabs;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;

import static net.halbear.aotg.AgeoftheGods.MODID;
import static net.halbear.aotg.registries.ModItems.*;
import static net.halbear.aotg.registries.ModItems.ALLOY_FURNACE_ITEM;
import static net.halbear.aotg.registries.ModItems.BRONZE_INGOT;
import static net.halbear.aotg.registries.ModItems.ELECTRUM_INGOT;
import static net.halbear.aotg.registries.ModItems.FORGE_WORKBENCH_ITEM;
import static net.halbear.aotg.registries.ModItems.HEPATIZON_INGOT;
import static net.halbear.aotg.registries.ModItems.LIMESTONE_GRASS_ITEM;
import static net.halbear.aotg.registries.ModItems.OLIVE_LEAVES_ITEM;
import static net.halbear.aotg.registries.ModItems.OLIVE_LOG_ITEM;
import static net.halbear.aotg.registries.ModItems.ORICHALCUM_INGOT;
import static net.halbear.aotg.registries.ModItems.SHALE_GRASS_ITEM;
import static net.halbear.aotg.registries.ModItems.SILVER_INGOT;
import static net.halbear.aotg.registries.ModItems.TIN_INGOT;
import static net.halbear.aotg.registries.ModItems.XIPHOS_SWORD;
import static net.halbear.aotg.registries.ModItems.ZINC_INGOT;

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


    public static final DeferredHolder<CreativeModeTab, CreativeModeTab> AGE_OF_THE_GODS_TAB = CREATIVE_MODE_TABS.register("age_of_the_gods", () -> CreativeModeTab.builder()
            .title(Component.translatable("itemGroup.ageofthegods")) //The language key for the title of your CreativeModeTab
            .withTabsBefore(CreativeModeTabs.COMBAT)
            .icon(() -> XIPHOS_SWORD.get().getDefaultInstance())
            .displayItems((parameters, output) -> {
                output.accept(LIMESTONE_ITEM.get());
                output.accept(SHALE_ITEM.get());
                output.accept(SHALE_GRASS_ITEM.get());
                output.accept(LIMESTONE_GRASS_ITEM.get());
                output.accept(OLIVE_LEAVES_ITEM.get());
                output.accept(OLIVE_LOG_ITEM.get());
                output.accept(XIPHOS_SWORD.get());
                output.accept(ALLOY_FURNACE_ITEM.get());
                output.accept(FORGE_WORKBENCH_ITEM.get());
                output.accept(TIN_INGOT.get());
                output.accept(ZINC_INGOT.get());
                output.accept(SILVER_INGOT.get());
                output.accept(BRONZE_INGOT.get());
                output.accept(ELECTRUM_INGOT.get());
                output.accept(HEPATIZON_INGOT.get());
                output.accept(ORICHALCUM_INGOT.get());
                output.accept(HARDENED_SLAG.get());
            }).build());
}
