/*
 *  Copyright 2025-2026 R3944Realms
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package top.r3944realms.eroticdungeongame.core.register;

import com.google.common.collect.ImmutableSet;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.ai.village.poi.PoiType;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import org.jetbrains.annotations.NotNull;
import top.r3944realms.eroticdungeongame.EroticDungeon;

public class EDGPois {
    public static final String DU_CT_POI = "dungeon_crafting_table_poi";
    public static final ResourceKey<PoiType> PROFITEER_KEY = createkey(DU_CT_POI);
    public static final DeferredRegister<PoiType> POI_TYPES =
            DeferredRegister.create(ForgeRegistries.POI_TYPES, EroticDungeon.MOD_ID);

    public static final RegistryObject<PoiType> DU_CRAFTING_TABLE_POI = POI_TYPES.register(DU_CT_POI,
            () -> new PoiType(ImmutableSet.copyOf(EDGBlocks.DUNGEON_CRAFTING_TABLE.get().getStateDefinition().getPossibleStates()),
                    1,1));
    private static @NotNull ResourceKey<PoiType> createkey(String pName){
        return  ResourceKey.create(Registries.POINT_OF_INTEREST_TYPE,new ResourceLocation(EroticDungeon.MOD_ID, pName));
    }
    public static void register(IEventBus eventBus) {
        POI_TYPES.register(eventBus);
    }
}
