package top.r3944realms.lib39.core.register;

import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredRegister;
import top.r3944realms.lib39.Lib39;
import top.r3944realms.lib39.content.block.blockentity.DollBlockEntity;

/**
 * The type Lib 39 block entities.
 */
public class NeoForgeLib39BlockEntities {
    /**
     * The constant BLOCK_ENTITY_TYPES.
     */
    public static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITY_TYPES = DeferredRegister.create(BuiltInRegistries.BLOCK_ENTITY_TYPE, Lib39.MOD_ID);

    static {
        //noinspection DataFlowIssue
        Lib39BlockEntities.DOLL_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("doll",
                () -> BlockEntityType.Builder
                        .of(DollBlockEntity::new, Lib39Blocks.DOLL.get(), Lib39Blocks.WALL_DOLL.get())
                        .build(null)
        );
    }

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