package net.Chipperfluff.chipi.block;

import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.block.MapColor;
import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;

import net.Chipperfluff.chipi.ChipiMod;

public class ModBlocks {

    public static final Block VOID_BLOCK = Registry.register(
        Registries.BLOCK,
        new Identifier(ChipiMod.MOD_ID, "void_block"),
        new VoidBlock(
            AbstractBlock.Settings.create()
                .strength(-1.0F, 3600000.0F)
                .mapColor(MapColor.BLACK)
                .dropsNothing()
                .pistonBehavior(PistonBehavior.BLOCK))
    );

    public static final Block CHIPPER_FRAME = Registry.register(
        Registries.BLOCK,
        new Identifier(ChipiMod.MOD_ID, "chipper_frame"),
        new ChipperFrameBlock(FabricBlockSettings.create().strength(3.0f).requiresTool())
    );

    public static final Block CHIPPER_PORTAL = Registry.register(
        Registries.BLOCK,
        new Identifier(ChipiMod.MOD_ID, "chipper_portal"),
        new ChipperPortalBlock(
            FabricBlockSettings.create()
                .noCollision()
                .luminance(3)
                .strength(-1.0f))
    );

    public static final Block CHIPPER_ORE = Registry.register(
        Registries.BLOCK,
        new Identifier(ChipiMod.MOD_ID, "chipper_ore"),
        new Block(AbstractBlock.Settings.copy(Blocks.IRON_ORE).requiresTool())
    );

    public static final Block CHIPPER_ALLOY_BLOCK = Registry.register(
        Registries.BLOCK,
        new Identifier(ChipiMod.MOD_ID, "chipper_alloy_block"),
        new Block(AbstractBlock.Settings.copy(Blocks.IRON_BLOCK).requiresTool())
    );

    public static final Block JINGLE_BLOCK = Registry.register(
        Registries.BLOCK,
        new Identifier(ChipiMod.MOD_ID, "jingle_block"),
        new Block(
            AbstractBlock.Settings.create()
                .strength(2.0f)
                .mapColor(MapColor.RED)
                .requiresTool()
        )
    );

    public static void register() {}
}
