/*
 * Copyright (c) 2026 盐灯水母
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

package com.remains_cave.item.menu;

import com.remains_cave.RemainsCaveMod;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.inventory.MenuType;
import net.neoforged.neoforge.common.extensions.IMenuTypeExtension;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;

public class ModMenus {
    public static final DeferredRegister<MenuType<?>> MENUS =
            DeferredRegister.create(Registries.MENU, RemainsCaveMod.MODID);

    public static final DeferredHolder<MenuType<?>, MenuType<QuiverMenu>> QUIVER_MENU =
            MENUS.register("quiver", () -> IMenuTypeExtension.create((windowId, inv, data) -> {
                // 从网络数据中读取物品（这里简单起见，不传递额外数据，客户端直接用 EMPTY）
                return new QuiverMenu(windowId, inv);
            }));
}