package top.r3944realms.lib39.core.register;

import net.minecraft.world.level.block.Block;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
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 ForgeLib39Blocks {
    /**
     * The constant BLOCKS.
     */
    public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, 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);
    }
}
