package com.trunksbomb.minetriad.registry;

import com.trunksbomb.minetriad.MineTriad;
import com.trunksbomb.minetriad.menu.CardBinderMenu;

import net.minecraft.core.registries.Registries;
import net.minecraft.world.inventory.MenuType;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.common.extensions.IMenuTypeExtension;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;

public final class TriadMenus {
    private static final DeferredRegister<MenuType<?>> MENUS = DeferredRegister.create(Registries.MENU, MineTriad.MOD_ID);

    public static final DeferredHolder<MenuType<?>, MenuType<CardBinderMenu>> CARD_BINDER = MENUS.register(
            "card_binder",
            () -> IMenuTypeExtension.create(CardBinderMenu::new));

    private TriadMenus() {
    }

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