package com.trunksbomb.minetriad.registry;

import com.trunksbomb.minetriad.MineTriad;
import com.trunksbomb.minetriad.blockentity.DuelTableBlockEntity;

import net.minecraft.core.registries.Registries;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;

public final class TriadBlockEntities {
    private static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITY_TYPES = DeferredRegister.create(Registries.BLOCK_ENTITY_TYPE, MineTriad.MOD_ID);

    public static final DeferredHolder<BlockEntityType<?>, BlockEntityType<DuelTableBlockEntity>> DUEL_TABLE = BLOCK_ENTITY_TYPES.register(
            "duel_table",
            () -> BlockEntityType.Builder.of(DuelTableBlockEntity::new, TriadBlocks.DUEL_TABLE.get()).build(null));

    private TriadBlockEntities() {
    }

    public static void register(IEventBus eventBus) {
        BLOCK_ENTITY_TYPES.register(eventBus);
    }
}
