package top.r3944realms.lib39.content.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.lib39.Lib39;
import top.r3944realms.lib39.content.block.blockentity.DollBlockEntity;

/**
 * The type Lib 39 block entities.
 */
public class Lib39BlockEntities {
    /**
     * The constant BLOCK_ENTITY_TYPES.
     */
    public static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, Lib39.MOD_ID);
    /**
     * The constant DOLL_BLOCK_ENTITY.
     */
    @SuppressWarnings("DataFlowIssue")
    public static final RegistryObject<BlockEntityType<DollBlockEntity>> DOLL_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("doll",
            () -> BlockEntityType.Builder
                    .of(DollBlockEntity::new, Lib39Blocks.DOLL.get())
                    .build(null)
    );

    /**
     * Register.
     *
     * @param bus the bus
     */
    public static void register(IEventBus bus) {
        BLOCK_ENTITY_TYPES.register(bus);
    }
}
