package com.acethewildfire.acesbs.block;

import com.acethewildfire.acesbs.world.tree.ModBlockSaplingGenerator;
import net.minecraft.block.*;
import net.minecraft.block.enums.NoteBlockInstrument;
import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.sound.BlockSoundGroup;

public class LemonWoodBlocks {
    public static final Block LEMONWOOD_LOG = ModBlocks.registerBlock("lemonwood_log",
            properties -> new PillarBlock(properties.mapColor(MapColor.PALE_YELLOW).sounds(BlockSoundGroup.WOOD)));
    public static final Block LEMONWOOD_WOOD = ModBlocks.registerBlock("lemonwood_wood",
            properties -> new PillarBlock(properties.mapColor(MapColor.PALE_YELLOW).instrument(NoteBlockInstrument.BASS).strength(2.0F).sounds(BlockSoundGroup.WOOD).burnable()));
    public static final Block STRIPPED_LEMONWOOD_LOG = ModBlocks.registerBlock("stripped_lemonwood_log",
            properties -> new PillarBlock(properties.mapColor(MapColor.PALE_YELLOW).instrument(NoteBlockInstrument.BASS).strength(2.0F).sounds(BlockSoundGroup.WOOD).burnable()));
    public static final Block STRIPPED_LEMONWOOD_WOOD = ModBlocks.registerBlock("stripped_lemonwood_wood",
            properties -> new PillarBlock(properties.mapColor(MapColor.PALE_YELLOW).instrument(NoteBlockInstrument.BASS).strength(2.0F).sounds(BlockSoundGroup.WOOD).burnable()));
    public static final Block LEMONWOOD_LEAVES = ModBlocks.registerBlock("lemonwood_leaves",
            properties -> new UntintedParticleLeavesBlock(0.02f, ParticleTypes.PALE_OAK_LEAVES, properties.mapColor(MapColor.DARK_GREEN).strength(0.2F).ticksRandomly().sounds(BlockSoundGroup.GRASS).nonOpaque().allowsSpawning(Blocks::canSpawnOnLeaves).suffocates(Blocks::never).blockVision(Blocks::never).burnable().pistonBehavior(PistonBehavior.DESTROY).solidBlock(Blocks::never)));
    public static final Block LEMONWOOD_SAPLING = ModBlocks.registerBlock("lemonwood_sapling",
            properties -> new SaplingBlock(ModBlockSaplingGenerator.LEMONWOOD, properties.mapColor(MapColor.DARK_GREEN).noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.GRASS).pistonBehavior(PistonBehavior.DESTROY)));
    public static final Block POTTED_LEMONWOOD_SAPLING = ModBlocks.registerBlock("potted_lemonwood_sapling", properties -> new FlowerPotBlock(LEMONWOOD_SAPLING, properties.breakInstantly().nonOpaque().pistonBehavior(PistonBehavior.DESTROY)));
    public static final Block LEMONWOOD_PLANKS = ModBlocks.registerBlock("lemonwood_planks",
            properties -> new Block(
                    properties
                            .mapColor(MapColor.PALE_YELLOW)
                            .instrument(NoteBlockInstrument.BASS)
                            .strength(2.0F, 3.0F)
                            .sounds(BlockSoundGroup.WOOD)
                            .burnable()
            ));
    public static final Block LEMONWOOD_STAIRS = ModBlocks.registerBlock("lemonwood_stairs",
            properties -> new StairsBlock(LEMONWOOD_PLANKS.getDefaultState(),
                    properties
                            .mapColor(MapColor.PALE_YELLOW)
                            .strength(2.0F, 3.0F)
                            .sounds(BlockSoundGroup.WOOD)
                            .burnable()
            ));
    public static final Block LEMONWOOD_SLAB = ModBlocks.registerBlock("lemonwood_slab",
            properties -> new SlabBlock(
                    properties
                            .mapColor(MapColor.PALE_YELLOW)
                            .strength(2.0F, 3.0F)
                            .sounds(BlockSoundGroup.WOOD)
                            .burnable()
            ));
    public static final Block LEMONWOOD_BUTTON = ModBlocks.registerBlock("lemonwood_button",
            properties -> new ButtonBlock(BlockSetType.BIRCH, 10,
                    properties
                            .mapColor(MapColor.PALE_YELLOW)
                            .strength(2.0F, 3.0F)
                            .sounds(BlockSoundGroup.WOOD)
                            .burnable()
                            .noCollision()
            ));
    public static final Block LEMONWOOD_PRESSURE_PLATE = ModBlocks.registerBlock("lemonwood_pressure_plate",
            properties -> new PressurePlateBlock(BlockSetType.BIRCH,
                    properties
                            .mapColor(MapColor.PALE_YELLOW)
                            .strength(2.0F, 3.0F)
                            .sounds(BlockSoundGroup.WOOD)
                            .burnable()
            ));
    public static final Block LEMONWOOD_FENCE = ModBlocks.registerBlock("lemonwood_fence",
            properties -> new FenceBlock(
                    properties
                            .mapColor(MapColor.PALE_YELLOW)
                            .strength(2.0F, 3.0F)
                            .sounds(BlockSoundGroup.WOOD)
                            .burnable()
            ));
    public static final Block LEMONWOOD_FENCE_GATE = ModBlocks.registerBlock("lemonwood_fence_gate",
            properties -> new FenceGateBlock(WoodType.BIRCH,
                    properties
                            .mapColor(MapColor.PALE_YELLOW)
                            .strength(2.0F, 3.0F)
                            .sounds(BlockSoundGroup.WOOD)
                            .burnable()
            ));
    public static final Block LEMONWOOD_WALL = ModBlocks.registerBlock("lemonwood_wall",
            properties -> new WallBlock(
                    properties
                            .mapColor(MapColor.PALE_YELLOW)
                            .strength(2.0F, 3.0F)
                            .sounds(BlockSoundGroup.WOOD)
                            .burnable()
            ));
    public static final Block LEMONWOOD_DOOR = ModBlocks.registerBlock("lemonwood_door",
            properties -> new DoorBlock(BlockSetType.BIRCH,
                    properties
                            .mapColor(MapColor.PALE_YELLOW)
                            .strength(2.0F, 3.0F)
                            .sounds(BlockSoundGroup.WOOD)
                            .burnable()
                            .nonOpaque()
            ));
    public static final Block LEMONWOOD_TRAPDOOR = ModBlocks.registerBlock("lemonwood_trapdoor",
            properties -> new TrapdoorBlock(BlockSetType.BIRCH,
                    properties
                            .mapColor(MapColor.PALE_YELLOW)
                            .strength(2.0F, 3.0F)
                            .sounds(BlockSoundGroup.WOOD)
                            .burnable()
                            .nonOpaque()
            ));

    public static void registerLemonwoodBlocks() {
        // Do nothing, this just makes sure the blocks get registered
    }
}
