package jesse.keeblarcraft.GuiMgr;

import jesse.keeblarcraft.GuiMgr.Factions.FactionBlockScreenHandler;
import jesse.keeblarcraft.GuiMgr.ShopKeeper.ShopKeeperHandler;
import jesse.keeblarcraft.Keeblarcraft;
import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerType;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.resource.featuretoggle.FeatureFlags;
import net.minecraft.screen.ScreenHandlerType;
import net.minecraft.util.Identifier;

public class ScreenHandlerRegistration {
    public static final ScreenHandlerType<FactionBlockScreenHandler> FACTION_BLOCK_SCREEN_HANDLER =
        Registry.register(Registries.SCREEN_HANDLER, new Identifier(Keeblarcraft.MOD_ID, "faction_block"),
            new ExtendedScreenHandlerType<>(FactionBlockScreenHandler::new));

    public static final ScreenHandlerType<ShopKeeperHandler> SHOP_KEEPER_HANDLER_SCREEN_HANDLER_TYPE =
        Registry.register(Registries.SCREEN_HANDLER, new Identifier(Keeblarcraft.MOD_ID, "shopkeeper"),
            new ScreenHandlerType<>(ShopKeeperHandler::new, FeatureFlags.VANILLA_FEATURES));



    public static void registerScreenHandlers() {
        Keeblarcraft.LOGGER.info("Registering screen handlers for {}", Keeblarcraft.MOD_ID);
    }
}
