/*
 *  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 net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import top.r3944realms.eroticdungeongame.EroticDungeon;
import top.r3944realms.eroticdungeongame.content.block.blockentity.*;

public class EDGBlockEntities {
    public static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, EroticDungeon.MOD_ID);
    @SuppressWarnings("DataFlowIssue")
    public static final RegistryObject<BlockEntityType<DefaultSeatBlockEntity>> DEFAULT_SEAT_BLOCK_ENTITY = BLOCK_ENTITIES.register("default_seat",
            () -> BlockEntityType.Builder
                    .of(DefaultSeatBlockEntity::new, EDGBlocks.getCuffedBlocks())
                    .build(null)
    );
    @SuppressWarnings("DataFlowIssue")
    public static final RegistryObject<BlockEntityType<IronCageBlockEntity>> IRON_CAGE_SEAT_BLOCK_ENTITY = BLOCK_ENTITIES.register("iron_cage",
            () -> BlockEntityType.Builder
                    .of(IronCageBlockEntity::new, EDGBlocks.IRON_CAGE.get())
                    .build(null)
    );

    @SuppressWarnings("DataFlowIssue")
    public static final RegistryObject<BlockEntityType<SpanishDonkeyBlockEntity>> SPANISH_DONKEY_BLOCK_ENTITY = BLOCK_ENTITIES.register("spanish_donkey",
            () -> BlockEntityType.Builder
                    .of(SpanishDonkeyBlockEntity::new, EDGBlocks.getSpanishDonkeyBlocks())
                    .build(null)
    );
    @SuppressWarnings("DataFlowIssue")
    public static final RegistryObject<BlockEntityType<PilloryBlockEntity>> PILLORY_BLOCK_ENTITY = BLOCK_ENTITIES.register("pillory",
            () -> BlockEntityType.Builder
                    .of(PilloryBlockEntity::new, EDGBlocks.getPilloryBlocks())
                    .build(null)
    );
    @SuppressWarnings("DataFlowIssue")
    public static final RegistryObject<BlockEntityType<LoveMachineBlockEntity>> LOVE_MACHINE_BLOCK_ENTITY = BLOCK_ENTITIES.register("love_machine",
            () -> BlockEntityType.Builder
                    .of(LoveMachineBlockEntity::new, EDGBlocks.END_ROD_LOVE_MACHINE.get(), EDGBlocks.LIGHTNING_ROD_LOVE_MACHINE.get())
                    .build(null)
    );
    public static void register(IEventBus eventBus) {
        BLOCK_ENTITIES.register(eventBus);
    }

}
