package top.r3944realms.lib39.core.register;

import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.level.block.Block;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredRegister;
import top.r3944realms.lib39.Lib39;
import top.r3944realms.lib39.content.block.DollBlock;
import top.r3944realms.lib39.content.block.WallDollBlock;
import top.r3944realms.lib39.util.block.BlockRegistryBuilder;

/**
 * The type Lib 39 blocks.
 */
public class NeoForgeLib39Blocks {
    /**
     * The constant BLOCKS.
     */
    public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(BuiltInRegistries.BLOCK, Lib39.MOD_ID);

    static  {
        Lib39Blocks.DOLL = BlockRegistryBuilder
                .create()
                .withName("doll")
                .registerBlock(BLOCKS::register, DollBlock::new)
                .build();
        Lib39Blocks.WALL_DOLL = BlockRegistryBuilder
                .create()
                .withName("wall_doll")
                .registerBlock(BLOCKS::register, WallDollBlock::new)
                .build();

    }

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