package ovh.glitchlabs.ornamentum.datagen;

import net.minecraft.core.HolderLookup;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.data.PackOutput;
import net.minecraft.data.recipes.RecipeCategory;
import net.minecraft.data.recipes.RecipeOutput;
import net.minecraft.data.recipes.RecipeProvider;
import net.minecraft.data.recipes.ShapedRecipeBuilder;
import net.minecraft.data.recipes.ShapelessRecipeBuilder;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import ovh.glitchlabs.ornamentum.Ornamentum;
import ovh.glitchlabs.ornamentum.blocks.ModBlocks;
import net.minecraft.data.recipes.SingleItemRecipeBuilder;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.CompletableFuture;

public class ModRecipeProvider extends RecipeProvider {

    public ModRecipeProvider(PackOutput output,
                             CompletableFuture<HolderLookup.Provider> registries) {
        super(output, registries);
    }

    @Override
    protected void buildRecipes(RecipeOutput output) {

        Map<ItemLike, ItemLike> glowGlassRecipes = new LinkedHashMap<>();
        Map<ItemLike, ItemLike> grateRecipes = new LinkedHashMap<>();
        Map<ItemLike, ItemLike> stairRecipes = new LinkedHashMap<>();
        Map<ItemLike, ItemLike> slabRecipes = new LinkedHashMap<>();
        Map<ItemLike, ItemLike> glowBlockRecipes = new LinkedHashMap<>();
        Map<Item, ItemLike> bricksDyeRecipes = new LinkedHashMap<>();

        glowBlockRecipes.put(Items.WHITE_CONCRETE, ModBlocks.WHITE_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.ORANGE_CONCRETE, ModBlocks.ORANGE_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.MAGENTA_CONCRETE, ModBlocks.MAGENTA_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.LIGHT_BLUE_CONCRETE, ModBlocks.LIGHT_BLUE_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.YELLOW_CONCRETE, ModBlocks.YELLOW_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.LIME_CONCRETE, ModBlocks.LIME_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.PINK_CONCRETE, ModBlocks.PINK_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.GRAY_CONCRETE, ModBlocks.GRAY_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.LIGHT_GRAY_CONCRETE, ModBlocks.LIGHT_GRAY_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.CYAN_CONCRETE, ModBlocks.CYAN_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.PURPLE_CONCRETE, ModBlocks.PURPLE_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.BLUE_CONCRETE, ModBlocks.BLUE_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.BROWN_CONCRETE, ModBlocks.BROWN_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.GREEN_CONCRETE, ModBlocks.GREEN_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.RED_CONCRETE, ModBlocks.RED_GLOW_BLOCK.get());
        glowBlockRecipes.put(Items.BLACK_CONCRETE, ModBlocks.BLACK_GLOW_BLOCK.get());

        glowGlassRecipes.put(Items.WHITE_STAINED_GLASS, ModBlocks.WHITE_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.ORANGE_STAINED_GLASS, ModBlocks.ORANGE_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.MAGENTA_STAINED_GLASS, ModBlocks.MAGENTA_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.LIGHT_BLUE_STAINED_GLASS, ModBlocks.LIGHT_BLUE_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.YELLOW_STAINED_GLASS, ModBlocks.YELLOW_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.LIME_STAINED_GLASS, ModBlocks.LIME_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.PINK_STAINED_GLASS, ModBlocks.PINK_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.GRAY_STAINED_GLASS, ModBlocks.GRAY_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.LIGHT_GRAY_STAINED_GLASS, ModBlocks.LIGHT_GRAY_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.CYAN_STAINED_GLASS, ModBlocks.CYAN_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.PURPLE_STAINED_GLASS, ModBlocks.PURPLE_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.BLUE_STAINED_GLASS, ModBlocks.BLUE_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.BROWN_STAINED_GLASS, ModBlocks.BROWN_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.GREEN_STAINED_GLASS, ModBlocks.GREEN_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.RED_STAINED_GLASS, ModBlocks.RED_GLOW_STAINED_GLASS.get());
        glowGlassRecipes.put(Items.BLACK_STAINED_GLASS, ModBlocks.BLACK_GLOW_STAINED_GLASS.get());

        // Wool stairs & slabs
        stairRecipes.put(Items.WHITE_WOOL, ModBlocks.WHITE_WOOL_STAIRS.get());
        stairRecipes.put(Items.ORANGE_WOOL, ModBlocks.ORANGE_WOOL_STAIRS.get());
        stairRecipes.put(Items.MAGENTA_WOOL, ModBlocks.MAGENTA_WOOL_STAIRS.get());
        stairRecipes.put(Items.LIGHT_BLUE_WOOL, ModBlocks.LIGHT_BLUE_WOOL_STAIRS.get());
        stairRecipes.put(Items.YELLOW_WOOL, ModBlocks.YELLOW_WOOL_STAIRS.get());
        stairRecipes.put(Items.LIME_WOOL, ModBlocks.LIME_WOOL_STAIRS.get());
        stairRecipes.put(Items.PINK_WOOL, ModBlocks.PINK_WOOL_STAIRS.get());
        stairRecipes.put(Items.GRAY_WOOL, ModBlocks.GRAY_WOOL_STAIRS.get());
        stairRecipes.put(Items.LIGHT_GRAY_WOOL, ModBlocks.LIGHT_GRAY_WOOL_STAIRS.get());
        stairRecipes.put(Items.CYAN_WOOL, ModBlocks.CYAN_WOOL_STAIRS.get());
        stairRecipes.put(Items.PURPLE_WOOL, ModBlocks.PURPLE_WOOL_STAIRS.get());
        stairRecipes.put(Items.BLUE_WOOL, ModBlocks.BLUE_WOOL_STAIRS.get());
        stairRecipes.put(Items.BROWN_WOOL, ModBlocks.BROWN_WOOL_STAIRS.get());
        stairRecipes.put(Items.GREEN_WOOL, ModBlocks.GREEN_WOOL_STAIRS.get());
        stairRecipes.put(Items.RED_WOOL, ModBlocks.RED_WOOL_STAIRS.get());
        stairRecipes.put(Items.BLACK_WOOL, ModBlocks.BLACK_WOOL_STAIRS.get());

        stairRecipes.put(ModBlocks.POOL_TILES.get(), ModBlocks.POOL_TILES_STAIRS.get());
        stairRecipes.put(ModBlocks.POOL_TILES1.get(), ModBlocks.POOL_TILES1_STAIRS.get());

        // Colored bricks stairs
        stairRecipes.put(ModBlocks.WHITE_BRICKS.get(), ModBlocks.WHITE_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.ORANGE_BRICKS.get(), ModBlocks.ORANGE_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.MAGENTA_BRICKS.get(), ModBlocks.MAGENTA_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.LIGHT_BLUE_BRICKS.get(), ModBlocks.LIGHT_BLUE_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.YELLOW_BRICKS.get(), ModBlocks.YELLOW_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.LIME_BRICKS.get(), ModBlocks.LIME_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.PINK_BRICKS.get(), ModBlocks.PINK_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.GRAY_BRICKS.get(), ModBlocks.GRAY_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.LIGHT_GRAY_BRICKS.get(), ModBlocks.LIGHT_GRAY_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.CYAN_BRICKS.get(), ModBlocks.CYAN_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.PURPLE_BRICKS.get(), ModBlocks.PURPLE_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.BLUE_BRICKS.get(), ModBlocks.BLUE_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.BROWN_BRICKS.get(), ModBlocks.BROWN_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.GREEN_BRICKS.get(), ModBlocks.GREEN_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.RED_BRICKS.get(), ModBlocks.RED_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.BLACK_BRICKS.get(), ModBlocks.BLACK_BRICKS_STAIRS.get());

        // Glow block stairs
        stairRecipes.put(ModBlocks.LIME_GLOW_BLOCK.get(), ModBlocks.LIME_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.WHITE_GLOW_BLOCK.get(), ModBlocks.WHITE_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.LIGHT_GRAY_GLOW_BLOCK.get(), ModBlocks.LIGHT_GRAY_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.GRAY_GLOW_BLOCK.get(), ModBlocks.GRAY_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.BLACK_GLOW_BLOCK.get(), ModBlocks.BLACK_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.BROWN_GLOW_BLOCK.get(), ModBlocks.BROWN_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.RED_GLOW_BLOCK.get(), ModBlocks.RED_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.ORANGE_GLOW_BLOCK.get(), ModBlocks.ORANGE_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.YELLOW_GLOW_BLOCK.get(), ModBlocks.YELLOW_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.GREEN_GLOW_BLOCK.get(), ModBlocks.GREEN_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.CYAN_GLOW_BLOCK.get(), ModBlocks.CYAN_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.LIGHT_BLUE_GLOW_BLOCK.get(), ModBlocks.LIGHT_BLUE_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.BLUE_GLOW_BLOCK.get(), ModBlocks.BLUE_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.PURPLE_GLOW_BLOCK.get(), ModBlocks.PURPLE_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.MAGENTA_GLOW_BLOCK.get(), ModBlocks.MAGENTA_GLOW_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.PINK_GLOW_BLOCK.get(), ModBlocks.PINK_GLOW_BLOCK_STAIRS.get());

        slabRecipes.put(Items.WHITE_WOOL, ModBlocks.WHITE_WOOL_SLAB.get());
        slabRecipes.put(Items.ORANGE_WOOL, ModBlocks.ORANGE_WOOL_SLAB.get());
        slabRecipes.put(Items.MAGENTA_WOOL, ModBlocks.MAGENTA_WOOL_SLAB.get());
        slabRecipes.put(Items.LIGHT_BLUE_WOOL, ModBlocks.LIGHT_BLUE_WOOL_SLAB.get());
        slabRecipes.put(Items.YELLOW_WOOL, ModBlocks.YELLOW_WOOL_SLAB.get());
        slabRecipes.put(Items.LIME_WOOL, ModBlocks.LIME_WOOL_SLAB.get());
        slabRecipes.put(Items.PINK_WOOL, ModBlocks.PINK_WOOL_SLAB.get());
        slabRecipes.put(Items.GRAY_WOOL, ModBlocks.GRAY_WOOL_SLAB.get());
        slabRecipes.put(Items.LIGHT_GRAY_WOOL, ModBlocks.LIGHT_GRAY_WOOL_SLAB.get());
        slabRecipes.put(Items.CYAN_WOOL, ModBlocks.CYAN_WOOL_SLAB.get());
        slabRecipes.put(Items.PURPLE_WOOL, ModBlocks.PURPLE_WOOL_SLAB.get());
        slabRecipes.put(Items.BLUE_WOOL, ModBlocks.BLUE_WOOL_SLAB.get());
        slabRecipes.put(Items.BROWN_WOOL, ModBlocks.BROWN_WOOL_SLAB.get());
        slabRecipes.put(Items.GREEN_WOOL, ModBlocks.GREEN_WOOL_SLAB.get());
        slabRecipes.put(Items.RED_WOOL, ModBlocks.RED_WOOL_SLAB.get());
        slabRecipes.put(Items.BLACK_WOOL, ModBlocks.BLACK_WOOL_SLAB.get());

        slabRecipes.put(ModBlocks.POOL_TILES.get(), ModBlocks.POOL_TILES_SLAB.get());
        slabRecipes.put(ModBlocks.POOL_TILES1.get(), ModBlocks.POOL_TILES1_SLAB.get());

        // Glow block slabs
        slabRecipes.put(ModBlocks.LIME_GLOW_BLOCK.get(), ModBlocks.LIME_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.WHITE_GLOW_BLOCK.get(), ModBlocks.WHITE_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.LIGHT_GRAY_GLOW_BLOCK.get(), ModBlocks.LIGHT_GRAY_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.GRAY_GLOW_BLOCK.get(), ModBlocks.GRAY_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.BLACK_GLOW_BLOCK.get(), ModBlocks.BLACK_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.BROWN_GLOW_BLOCK.get(), ModBlocks.BROWN_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.RED_GLOW_BLOCK.get(), ModBlocks.RED_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.ORANGE_GLOW_BLOCK.get(), ModBlocks.ORANGE_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.YELLOW_GLOW_BLOCK.get(), ModBlocks.YELLOW_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.GREEN_GLOW_BLOCK.get(), ModBlocks.GREEN_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.CYAN_GLOW_BLOCK.get(), ModBlocks.CYAN_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.LIGHT_BLUE_GLOW_BLOCK.get(), ModBlocks.LIGHT_BLUE_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.BLUE_GLOW_BLOCK.get(), ModBlocks.BLUE_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.PURPLE_GLOW_BLOCK.get(), ModBlocks.PURPLE_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.MAGENTA_GLOW_BLOCK.get(), ModBlocks.MAGENTA_GLOW_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.PINK_GLOW_BLOCK.get(), ModBlocks.PINK_GLOW_BLOCK_SLAB.get());

        // Colored bricks slabs
        slabRecipes.put(ModBlocks.WHITE_BRICKS.get(), ModBlocks.WHITE_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.ORANGE_BRICKS.get(), ModBlocks.ORANGE_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.MAGENTA_BRICKS.get(), ModBlocks.MAGENTA_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.LIGHT_BLUE_BRICKS.get(), ModBlocks.LIGHT_BLUE_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.YELLOW_BRICKS.get(), ModBlocks.YELLOW_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.LIME_BRICKS.get(), ModBlocks.LIME_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.PINK_BRICKS.get(), ModBlocks.PINK_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.GRAY_BRICKS.get(), ModBlocks.GRAY_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.LIGHT_GRAY_BRICKS.get(), ModBlocks.LIGHT_GRAY_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.CYAN_BRICKS.get(), ModBlocks.CYAN_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.PURPLE_BRICKS.get(), ModBlocks.PURPLE_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.BLUE_BRICKS.get(), ModBlocks.BLUE_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.BROWN_BRICKS.get(), ModBlocks.BROWN_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.GREEN_BRICKS.get(), ModBlocks.GREEN_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.RED_BRICKS.get(), ModBlocks.RED_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.BLACK_BRICKS.get(), ModBlocks.BLACK_BRICKS_SLAB.get());

        grateRecipes.put(Items.IRON_BLOCK, ModBlocks.IRON_GRATE.get());
        grateRecipes.put(Items.GOLD_BLOCK, ModBlocks.GOLD_GRATE.get());
        grateRecipes.put(Items.DIAMOND_BLOCK, ModBlocks.DIAMOND_GRATE.get());
        grateRecipes.put(Items.NETHERITE_BLOCK, ModBlocks.NETHERITE_GRATE.get());
        grateRecipes.put(Items.AMETHYST_BLOCK, ModBlocks.AMETHYST_GRATE.get());
        grateRecipes.put(Items.OBSIDIAN, ModBlocks.OBSIDIAN_GRATE.get());

        // Colored bricks: Vanilla Bricks + Dye -> colored Bricks
        bricksDyeRecipes.put(Items.WHITE_DYE, ModBlocks.WHITE_BRICKS.get());
        bricksDyeRecipes.put(Items.ORANGE_DYE, ModBlocks.ORANGE_BRICKS.get());
        bricksDyeRecipes.put(Items.MAGENTA_DYE, ModBlocks.MAGENTA_BRICKS.get());
        bricksDyeRecipes.put(Items.LIGHT_BLUE_DYE, ModBlocks.LIGHT_BLUE_BRICKS.get());
        bricksDyeRecipes.put(Items.YELLOW_DYE, ModBlocks.YELLOW_BRICKS.get());
        bricksDyeRecipes.put(Items.LIME_DYE, ModBlocks.LIME_BRICKS.get());
        bricksDyeRecipes.put(Items.PINK_DYE, ModBlocks.PINK_BRICKS.get());
        bricksDyeRecipes.put(Items.GRAY_DYE, ModBlocks.GRAY_BRICKS.get());
        bricksDyeRecipes.put(Items.LIGHT_GRAY_DYE, ModBlocks.LIGHT_GRAY_BRICKS.get());
        bricksDyeRecipes.put(Items.CYAN_DYE, ModBlocks.CYAN_BRICKS.get());
        bricksDyeRecipes.put(Items.PURPLE_DYE, ModBlocks.PURPLE_BRICKS.get());
        bricksDyeRecipes.put(Items.BLUE_DYE, ModBlocks.BLUE_BRICKS.get());
        bricksDyeRecipes.put(Items.BROWN_DYE, ModBlocks.BROWN_BRICKS.get());
        bricksDyeRecipes.put(Items.GREEN_DYE, ModBlocks.GREEN_BRICKS.get());
        bricksDyeRecipes.put(Items.RED_DYE, ModBlocks.RED_BRICKS.get());
        bricksDyeRecipes.put(Items.BLACK_DYE, ModBlocks.BLACK_BRICKS.get());

        createBrickRecipe(output, Blocks.AMETHYST_BLOCK, ModBlocks.AMETIST_BRICKS.get());
        createBrickRecipe(output, Blocks.POLISHED_ANDESITE, ModBlocks.POLISHED_ANDESITE_BRICKS.get());
        createBrickRecipe(output, Blocks.POLISHED_DIORITE, ModBlocks.POLISHED_DIORITE_BRICKS.get());
        createBrickRecipe(output, Blocks.POLISHED_GRANITE, ModBlocks.POLISHED_GRANITE_BRICKS.get());
        createBrickRecipe(output, Blocks.PURPUR_BLOCK, ModBlocks.PURPUR_BRICKS.get());
        createBrickRecipe(output, Blocks.SMOOTH_BASALT, ModBlocks.SMOOTH_BASALT_BRICKS.get());

        stairRecipes.put(ModBlocks.AMETIST_BRICKS.get(), ModBlocks.AMETIST_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.POLISHED_ANDESITE_BRICKS.get(), ModBlocks.POLISHED_ANDESITE_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.POLISHED_DIORITE_BRICKS.get(), ModBlocks.POLISHED_DIORITE_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.POLISHED_GRANITE_BRICKS.get(), ModBlocks.POLISHED_GRANITE_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.PURPUR_BRICKS.get(), ModBlocks.PURPUR_BRICKS_STAIRS.get());
        stairRecipes.put(ModBlocks.SMOOTH_BASALT_BRICKS.get(), ModBlocks.SMOOTH_BASALT_BRICKS_STAIRS.get());

        slabRecipes.put(ModBlocks.AMETIST_BRICKS.get(), ModBlocks.AMETIST_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.POLISHED_ANDESITE_BRICKS.get(), ModBlocks.POLISHED_ANDESITE_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.POLISHED_DIORITE_BRICKS.get(), ModBlocks.POLISHED_DIORITE_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.POLISHED_GRANITE_BRICKS.get(), ModBlocks.POLISHED_GRANITE_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.PURPUR_BRICKS.get(), ModBlocks.PURPUR_BRICKS_SLAB.get());
        slabRecipes.put(ModBlocks.SMOOTH_BASALT_BRICKS.get(), ModBlocks.SMOOTH_BASALT_BRICKS_SLAB.get());

        // Pattern Block Stairs
        stairRecipes.put(ModBlocks.WHITE_PATTERN_BLOCK.get(), ModBlocks.WHITE_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.ORANGE_PATTERN_BLOCK.get(), ModBlocks.ORANGE_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.MAGENTA_PATTERN_BLOCK.get(), ModBlocks.MAGENTA_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.LIGHT_BLUE_PATTERN_BLOCK.get(), ModBlocks.LIGHT_BLUE_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.YELLOW_PATTERN_BLOCK.get(), ModBlocks.YELLOW_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.LIME_PATTERN_BLOCK.get(), ModBlocks.LIME_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.PINK_PATTERN_BLOCK.get(), ModBlocks.PINK_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.GRAY_PATTERN_BLOCK.get(), ModBlocks.GRAY_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.LIGHT_GRAY_PATTERN_BLOCK.get(), ModBlocks.LIGHT_GRAY_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.CYAN_PATTERN_BLOCK.get(), ModBlocks.CYAN_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.PURPLE_PATTERN_BLOCK.get(), ModBlocks.PURPLE_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.BLUE_PATTERN_BLOCK.get(), ModBlocks.BLUE_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.BROWN_PATTERN_BLOCK.get(), ModBlocks.BROWN_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.GREEN_PATTERN_BLOCK.get(), ModBlocks.GREEN_PATTERN_BLOCK_STAIRS.get());
        stairRecipes.put(ModBlocks.BLACK_PATTERN_BLOCK.get(), ModBlocks.BLACK_PATTERN_BLOCK_STAIRS.get());

        // Pattern Block Slabs
        slabRecipes.put(ModBlocks.WHITE_PATTERN_BLOCK.get(), ModBlocks.WHITE_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.ORANGE_PATTERN_BLOCK.get(), ModBlocks.ORANGE_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.MAGENTA_PATTERN_BLOCK.get(), ModBlocks.MAGENTA_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.LIGHT_BLUE_PATTERN_BLOCK.get(), ModBlocks.LIGHT_BLUE_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.YELLOW_PATTERN_BLOCK.get(), ModBlocks.YELLOW_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.LIME_PATTERN_BLOCK.get(), ModBlocks.LIME_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.PINK_PATTERN_BLOCK.get(), ModBlocks.PINK_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.GRAY_PATTERN_BLOCK.get(), ModBlocks.GRAY_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.LIGHT_GRAY_PATTERN_BLOCK.get(), ModBlocks.LIGHT_GRAY_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.CYAN_PATTERN_BLOCK.get(), ModBlocks.CYAN_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.PURPLE_PATTERN_BLOCK.get(), ModBlocks.PURPLE_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.BLUE_PATTERN_BLOCK.get(), ModBlocks.BLUE_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.BROWN_PATTERN_BLOCK.get(), ModBlocks.BROWN_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.GREEN_PATTERN_BLOCK.get(), ModBlocks.GREEN_PATTERN_BLOCK_SLAB.get());
        slabRecipes.put(ModBlocks.BLACK_PATTERN_BLOCK.get(), ModBlocks.BLACK_PATTERN_BLOCK_SLAB.get());


        grateRecipes.forEach((input, result) ->
                createGrateRecipe(output, input, result));

        glowGlassRecipes.forEach((input, result) ->
                createGlowGlassRecipe(output, input, result));

        glowBlockRecipes.forEach((input, result) ->
                createGlowBlockRecipe(output, input, result));

        stairRecipes.forEach((input, result) ->
                createStairsRecipe(output, input, result));

        slabRecipes.forEach((input, result) ->
                createSlabRecipe(output, input, result));

        bricksDyeRecipes.forEach((dye, result) ->
                createBricksDyeRecipe(output, dye, result));

        // ---- Stonecutter: colored Concrete -> Pattern Block / Stairs / Slab ----
        Item[] concretes = {
                Items.WHITE_CONCRETE, Items.ORANGE_CONCRETE, Items.MAGENTA_CONCRETE, Items.LIGHT_BLUE_CONCRETE,
                Items.YELLOW_CONCRETE, Items.LIME_CONCRETE, Items.PINK_CONCRETE, Items.GRAY_CONCRETE,
                Items.LIGHT_GRAY_CONCRETE, Items.CYAN_CONCRETE, Items.PURPLE_CONCRETE, Items.BLUE_CONCRETE,
                Items.BROWN_CONCRETE, Items.GREEN_CONCRETE, Items.RED_CONCRETE, Items.BLACK_CONCRETE
        };

        ItemLike[] Flags = {
                ModBlocks.WHITE_FLAG.get(), ModBlocks.ORANGE_FLAG.get(), ModBlocks.MAGENTA_FLAG.get(),
                ModBlocks.LIGHT_BLUE_FLAG.get(), ModBlocks.YELLOW_FLAG.get(), ModBlocks.LIME_FLAG.get(),
                ModBlocks.PINK_FLAG.get(), ModBlocks.GRAY_FLAG.get(), ModBlocks.LIGHT_GRAY_FLAG.get(),
                ModBlocks.CYAN_FLAG.get(), ModBlocks.PURPLE_FLAG.get(), ModBlocks.BLUE_FLAG.get(),
                ModBlocks.BROWN_FLAG.get(), ModBlocks.GREEN_FLAG.get(), ModBlocks.RED_FLAG.get(),
                ModBlocks.BLACK_FLAG.get(),

                ModBlocks.AUSTRIA_FLAG.get(), ModBlocks.BOUVET_ISLAND_FLAG.get(), ModBlocks.CANADA_FLAG.get(),
                ModBlocks.CHINA_FLAG.get(), ModBlocks.DENMARK_FLAG.get(), ModBlocks.FINLAND_FLAG.get(),
                ModBlocks.FRANCE_FLAG.get(), ModBlocks.GERMANY_FLAG.get(), ModBlocks.GREECE_FLAG.get(),
                ModBlocks.HUNGARY_FLAG.get(), ModBlocks.ICELAND_FLAG.get(), ModBlocks.INDIA_FLAG.get(),
                ModBlocks.IRELAND_FLAG.get(), ModBlocks.ITALY_FLAG.get(), ModBlocks.JAPAN_FLAG.get(),
                ModBlocks.LATVIA_FLAG.get(), ModBlocks.NETHERLANDS_FLAG.get(), ModBlocks.SWEDEN_FLAG.get(),
                ModBlocks.SWITZERLAND_FLAG.get(), ModBlocks.UNITED_KINGDOM_FLAG.get(), ModBlocks.UNITED_STATES_FLAG.get(),

                ModBlocks.AGENDER_FLAG.get(), ModBlocks.AROACE_FLAG.get(), ModBlocks.AROMANTIC_FLAG.get(),
                ModBlocks.ASEXUAL_FLAG.get(), ModBlocks.BISEXUAL_FLAG.get(), ModBlocks.DEMIROMANTIC_FLAG.get(),
                ModBlocks.DEMISEXUAL_FLAG.get(), ModBlocks.GAY_MEN_FLAG.get(), ModBlocks.GENDERFLUID_FLAG.get(),
                ModBlocks.GENDERQUEER_FLAG.get(), ModBlocks.INTERSEX_FLAG.get(), ModBlocks.LESBIAN_FLAG.get(),
                ModBlocks.NON_BINARY_FLAG.get(), ModBlocks.OMNISEXUAL_FLAG.get(), ModBlocks.PANSEXUAL_FLAG.get(),
                ModBlocks.PRIDE_FLAG.get(), ModBlocks.PROGRESS_PRIDE_FLAG.get(), ModBlocks.TRANS_FLAG.get()
        };

        ItemLike[] patternBlocks = {
                ModBlocks.WHITE_PATTERN_BLOCK.get(), ModBlocks.ORANGE_PATTERN_BLOCK.get(), ModBlocks.MAGENTA_PATTERN_BLOCK.get(),
                ModBlocks.LIGHT_BLUE_PATTERN_BLOCK.get(), ModBlocks.YELLOW_PATTERN_BLOCK.get(), ModBlocks.LIME_PATTERN_BLOCK.get(),
                ModBlocks.PINK_PATTERN_BLOCK.get(), ModBlocks.GRAY_PATTERN_BLOCK.get(), ModBlocks.LIGHT_GRAY_PATTERN_BLOCK.get(),
                ModBlocks.CYAN_PATTERN_BLOCK.get(), ModBlocks.PURPLE_PATTERN_BLOCK.get(), ModBlocks.BLUE_PATTERN_BLOCK.get(),
                ModBlocks.BROWN_PATTERN_BLOCK.get(), ModBlocks.GREEN_PATTERN_BLOCK.get(), ModBlocks.RED_PATTERN_BLOCK.get(),
                ModBlocks.BLACK_PATTERN_BLOCK.get()
        };

        ItemLike[] patternBlockStairs = {
                ModBlocks.WHITE_PATTERN_BLOCK_STAIRS.get(), ModBlocks.ORANGE_PATTERN_BLOCK_STAIRS.get(), ModBlocks.MAGENTA_PATTERN_BLOCK_STAIRS.get(),
                ModBlocks.LIGHT_BLUE_PATTERN_BLOCK_STAIRS.get(), ModBlocks.YELLOW_PATTERN_BLOCK_STAIRS.get(), ModBlocks.LIME_PATTERN_BLOCK_STAIRS.get(),
                ModBlocks.PINK_PATTERN_BLOCK_STAIRS.get(), ModBlocks.GRAY_PATTERN_BLOCK_STAIRS.get(), ModBlocks.LIGHT_GRAY_PATTERN_BLOCK_STAIRS.get(),
                ModBlocks.CYAN_PATTERN_BLOCK_STAIRS.get(), ModBlocks.PURPLE_PATTERN_BLOCK_STAIRS.get(), ModBlocks.BLUE_PATTERN_BLOCK_STAIRS.get(),
                ModBlocks.BROWN_PATTERN_BLOCK_STAIRS.get(), ModBlocks.GREEN_PATTERN_BLOCK_STAIRS.get(), ModBlocks.RED_PATTERN_BLOCK_STAIRS.get(),
                ModBlocks.BLACK_PATTERN_BLOCK_STAIRS.get()
        };

        ItemLike[] patternBlockSlabs = {
                ModBlocks.WHITE_PATTERN_BLOCK_SLAB.get(), ModBlocks.ORANGE_PATTERN_BLOCK_SLAB.get(), ModBlocks.MAGENTA_PATTERN_BLOCK_SLAB.get(),
                ModBlocks.LIGHT_BLUE_PATTERN_BLOCK_SLAB.get(), ModBlocks.YELLOW_PATTERN_BLOCK_SLAB.get(), ModBlocks.LIME_PATTERN_BLOCK_SLAB.get(),
                ModBlocks.PINK_PATTERN_BLOCK_SLAB.get(), ModBlocks.GRAY_PATTERN_BLOCK_SLAB.get(), ModBlocks.LIGHT_GRAY_PATTERN_BLOCK_SLAB.get(),
                ModBlocks.CYAN_PATTERN_BLOCK_SLAB.get(), ModBlocks.PURPLE_PATTERN_BLOCK_SLAB.get(), ModBlocks.BLUE_PATTERN_BLOCK_SLAB.get(),
                ModBlocks.BROWN_PATTERN_BLOCK_SLAB.get(), ModBlocks.GREEN_PATTERN_BLOCK_SLAB.get(), ModBlocks.RED_PATTERN_BLOCK_SLAB.get(),
                ModBlocks.BLACK_PATTERN_BLOCK_SLAB.get()
        };

        // ---- Dye / recolor recipes (like vanilla wool/glass: any color + dye -> target color) ----
        String[] colorNames = {
                "white", "orange", "magenta", "light_blue", "yellow", "lime", "pink",
                "gray", "light_gray", "cyan", "purple", "blue", "brown", "green", "red", "black"
        };

        for (int i = 0; i < colorNames.length; i++) {
            createStonecuttingRecipe(output, concretes[i], patternBlocks[i], 1,
                    colorNames[i] + "_pattern_block_from_stonecutting");
        }

        ItemLike whiteFlag = ModBlocks.WHITE_FLAG.get();

        for (ItemLike flag : Flags) {

            // White Flag -> White Flag überspringen
            if (flag == whiteFlag)
                continue;

            String outputName = BuiltInRegistries.BLOCK
                    .getKey((Block) flag)
                    .getPath();

            createStonecuttingRecipe(
                    output,
                    whiteFlag,
                    flag,
                    1,
                    outputName + "_from_white_flag_stonecutting"
            );
        }

        for (ItemLike flag : Flags) {

            if (flag == whiteFlag)
                continue;

            String inputName = BuiltInRegistries.BLOCK
                    .getKey((Block) flag)
                    .getPath();

            createStonecuttingRecipe(
                    output,
                    flag,
                    whiteFlag,
                    1,
                    "white_flag_from_" + inputName + "_stonecutting"
            );
        }

        Item[] dyes = {
                Items.WHITE_DYE, Items.ORANGE_DYE, Items.MAGENTA_DYE, Items.LIGHT_BLUE_DYE,
                Items.YELLOW_DYE, Items.LIME_DYE, Items.PINK_DYE, Items.GRAY_DYE,
                Items.LIGHT_GRAY_DYE, Items.CYAN_DYE, Items.PURPLE_DYE, Items.BLUE_DYE,
                Items.BROWN_DYE, Items.GREEN_DYE, Items.RED_DYE, Items.BLACK_DYE
        };

        ItemLike[] glowGlassColors = {
                ModBlocks.WHITE_GLOW_STAINED_GLASS.get(), ModBlocks.ORANGE_GLOW_STAINED_GLASS.get(),
                ModBlocks.MAGENTA_GLOW_STAINED_GLASS.get(), ModBlocks.LIGHT_BLUE_GLOW_STAINED_GLASS.get(),
                ModBlocks.YELLOW_GLOW_STAINED_GLASS.get(), ModBlocks.LIME_GLOW_STAINED_GLASS.get(),
                ModBlocks.PINK_GLOW_STAINED_GLASS.get(), ModBlocks.GRAY_GLOW_STAINED_GLASS.get(),
                ModBlocks.LIGHT_GRAY_GLOW_STAINED_GLASS.get(), ModBlocks.CYAN_GLOW_STAINED_GLASS.get(),
                ModBlocks.PURPLE_GLOW_STAINED_GLASS.get(), ModBlocks.BLUE_GLOW_STAINED_GLASS.get(),
                ModBlocks.BROWN_GLOW_STAINED_GLASS.get(), ModBlocks.GREEN_GLOW_STAINED_GLASS.get(),
                ModBlocks.RED_GLOW_STAINED_GLASS.get(), ModBlocks.BLACK_GLOW_STAINED_GLASS.get()
        };

        ItemLike[] woolStairsColors = {
                ModBlocks.WHITE_WOOL_STAIRS.get(), ModBlocks.ORANGE_WOOL_STAIRS.get(),
                ModBlocks.MAGENTA_WOOL_STAIRS.get(), ModBlocks.LIGHT_BLUE_WOOL_STAIRS.get(),
                ModBlocks.YELLOW_WOOL_STAIRS.get(), ModBlocks.LIME_WOOL_STAIRS.get(),
                ModBlocks.PINK_WOOL_STAIRS.get(), ModBlocks.GRAY_WOOL_STAIRS.get(),
                ModBlocks.LIGHT_GRAY_WOOL_STAIRS.get(), ModBlocks.CYAN_WOOL_STAIRS.get(),
                ModBlocks.PURPLE_WOOL_STAIRS.get(), ModBlocks.BLUE_WOOL_STAIRS.get(),
                ModBlocks.BROWN_WOOL_STAIRS.get(), ModBlocks.GREEN_WOOL_STAIRS.get(),
                ModBlocks.RED_WOOL_STAIRS.get(), ModBlocks.BLACK_WOOL_STAIRS.get()
        };

        ItemLike[] woolSlabColors = {
                ModBlocks.WHITE_WOOL_SLAB.get(), ModBlocks.ORANGE_WOOL_SLAB.get(),
                ModBlocks.MAGENTA_WOOL_SLAB.get(), ModBlocks.LIGHT_BLUE_WOOL_SLAB.get(),
                ModBlocks.YELLOW_WOOL_SLAB.get(), ModBlocks.LIME_WOOL_SLAB.get(),
                ModBlocks.PINK_WOOL_SLAB.get(), ModBlocks.GRAY_WOOL_SLAB.get(),
                ModBlocks.LIGHT_GRAY_WOOL_SLAB.get(), ModBlocks.CYAN_WOOL_SLAB.get(),
                ModBlocks.PURPLE_WOOL_SLAB.get(), ModBlocks.BLUE_WOOL_SLAB.get(),
                ModBlocks.BROWN_WOOL_SLAB.get(), ModBlocks.GREEN_WOOL_SLAB.get(),
                ModBlocks.RED_WOOL_SLAB.get(), ModBlocks.BLACK_WOOL_SLAB.get()
        };

        ItemLike[] glowBlockColors = {
                ModBlocks.WHITE_GLOW_BLOCK.get(), ModBlocks.ORANGE_GLOW_BLOCK.get(),
                ModBlocks.MAGENTA_GLOW_BLOCK.get(), ModBlocks.LIGHT_BLUE_GLOW_BLOCK.get(),
                ModBlocks.YELLOW_GLOW_BLOCK.get(), ModBlocks.LIME_GLOW_BLOCK.get(),
                ModBlocks.PINK_GLOW_BLOCK.get(), ModBlocks.GRAY_GLOW_BLOCK.get(),
                ModBlocks.LIGHT_GRAY_GLOW_BLOCK.get(), ModBlocks.CYAN_GLOW_BLOCK.get(),
                ModBlocks.PURPLE_GLOW_BLOCK.get(), ModBlocks.BLUE_GLOW_BLOCK.get(),
                ModBlocks.BROWN_GLOW_BLOCK.get(), ModBlocks.GREEN_GLOW_BLOCK.get(),
                ModBlocks.RED_GLOW_BLOCK.get(), ModBlocks.BLACK_GLOW_BLOCK.get()
        };

        ItemLike[] brickColors = {
                ModBlocks.WHITE_BRICKS.get(), ModBlocks.ORANGE_BRICKS.get(),
                ModBlocks.MAGENTA_BRICKS.get(), ModBlocks.LIGHT_BLUE_BRICKS.get(),
                ModBlocks.YELLOW_BRICKS.get(), ModBlocks.LIME_BRICKS.get(),
                ModBlocks.PINK_BRICKS.get(), ModBlocks.GRAY_BRICKS.get(),
                ModBlocks.LIGHT_GRAY_BRICKS.get(), ModBlocks.CYAN_BRICKS.get(),
                ModBlocks.PURPLE_BRICKS.get(), ModBlocks.BLUE_BRICKS.get(),
                ModBlocks.BROWN_BRICKS.get(), ModBlocks.GREEN_BRICKS.get(),
                ModBlocks.RED_BRICKS.get(), ModBlocks.BLACK_BRICKS.get()
        };

        ItemLike[] brickStairsColors = {
                ModBlocks.WHITE_BRICKS_STAIRS.get(), ModBlocks.ORANGE_BRICKS_STAIRS.get(),
                ModBlocks.MAGENTA_BRICKS_STAIRS.get(), ModBlocks.LIGHT_BLUE_BRICKS_STAIRS.get(),
                ModBlocks.YELLOW_BRICKS_STAIRS.get(), ModBlocks.LIME_BRICKS_STAIRS.get(),
                ModBlocks.PINK_BRICKS_STAIRS.get(), ModBlocks.GRAY_BRICKS_STAIRS.get(),
                ModBlocks.LIGHT_GRAY_BRICKS_STAIRS.get(), ModBlocks.CYAN_BRICKS_STAIRS.get(),
                ModBlocks.PURPLE_BRICKS_STAIRS.get(), ModBlocks.BLUE_BRICKS_STAIRS.get(),
                ModBlocks.BROWN_BRICKS_STAIRS.get(), ModBlocks.GREEN_BRICKS_STAIRS.get(),
                ModBlocks.RED_BRICKS_STAIRS.get(), ModBlocks.BLACK_BRICKS_STAIRS.get()
        };

        ItemLike[] brickSlabsColors = {
                ModBlocks.WHITE_BRICKS_SLAB.get(), ModBlocks.ORANGE_BRICKS_SLAB.get(),
                ModBlocks.MAGENTA_BRICKS_SLAB.get(), ModBlocks.LIGHT_BLUE_BRICKS_SLAB.get(),
                ModBlocks.YELLOW_BRICKS_SLAB.get(), ModBlocks.LIME_BRICKS_SLAB.get(),
                ModBlocks.PINK_BRICKS_SLAB.get(), ModBlocks.GRAY_BRICKS_SLAB.get(),
                ModBlocks.LIGHT_GRAY_BRICKS_SLAB.get(), ModBlocks.CYAN_BRICKS_SLAB.get(),
                ModBlocks.PURPLE_BRICKS_SLAB.get(), ModBlocks.BLUE_BRICKS_SLAB.get(),
                ModBlocks.BROWN_BRICKS_SLAB.get(), ModBlocks.GREEN_BRICKS_SLAB.get(),
                ModBlocks.RED_BRICKS_SLAB.get(), ModBlocks.BLACK_BRICKS_SLAB.get()
        };



        createDyeRecipes(output, "glow_stained_glass", glowGlassColors, dyes, colorNames);
        createDyeRecipes(output, "wool_stairs", woolStairsColors, dyes, colorNames);
        createDyeRecipes(output, "wool_slabs", woolSlabColors, dyes, colorNames);
        createDyeRecipes(output, "glow_block", glowBlockColors, dyes, colorNames);
        createDyeRecipes(output, "bricks", brickColors, dyes, colorNames);
        createDyeRecipes(output, "bricks_stairs", brickStairsColors, dyes, colorNames);
        createDyeRecipes(output, "bricks_slabs", brickSlabsColors, dyes, colorNames);
    }


    private void createStonecuttingRecipe(RecipeOutput output, ItemLike input, ItemLike result, int count, String recipeName) {
        SingleItemRecipeBuilder.stonecutting(Ingredient.of(input), RecipeCategory.BUILDING_BLOCKS, result, count)
                .unlockedBy("has_input", has(input))
                .save(output, ResourceLocation.fromNamespaceAndPath(Ornamentum.MODID, recipeName));
    }

    private void createDyeRecipes(RecipeOutput output, String category, ItemLike[] items, Item[] dyes, String[] names) {
        for (int i = 0; i < items.length; i++) {
            ShapelessRecipeBuilder.shapeless(RecipeCategory.BUILDING_BLOCKS, items[i], 1)
                    .requires(Ingredient.of(items))
                    .requires(dyes[i])
                    .group(category + "_dye")
                    .unlockedBy("has_dye", has(dyes[i]))
                    .save(output, ResourceLocation.fromNamespaceAndPath(
                            Ornamentum.MODID, names[i] + "_" + category + "_from_dye"));
        }
    }

    private void createGlowGlassRecipe(RecipeOutput output,
                                       ItemLike input,
                                       ItemLike result) {

        ShapedRecipeBuilder.shaped(
                        RecipeCategory.BUILDING_BLOCKS,
                        result,
                        8
                )
                .pattern("###")
                .pattern("#X#")
                .pattern("###")
                .define('#', input)
                .define('X', Items.GLOW_INK_SAC)
                .group("stained_glass")
                .unlockedBy("has_glow_ink_sac", has(Items.GLOW_INK_SAC))
                .save(output);
    }

    public void createGrateRecipe(RecipeOutput output, ItemLike input, ItemLike result) {
        ShapedRecipeBuilder.shaped(
                        RecipeCategory.BUILDING_BLOCKS,
                        result,
                        1
                )
                .pattern(" # ")
                .pattern("# #")
                .pattern(" # ")
                .define('#', input)
                .group("grates")
                .unlockedBy("has_iron_bars", has(Items.IRON_BARS))
                .save(output);
    }

    private void createGlowBlockRecipe(RecipeOutput output, ItemLike input, ItemLike result) {
        ShapedRecipeBuilder.shaped(
                        RecipeCategory.BUILDING_BLOCKS,
                        result,
                        4
                )
                .pattern(" # ")
                .pattern("#A#")
                .pattern(" # ")
                .define('#', input)
                .define('A', Items.GLOW_INK_SAC)
                .group("glow_block")
                .unlockedBy("has_glow_ink_sac", has(Items.GLOW_INK_SAC))
                .save(output);
    }

    private void createBricksDyeRecipe(RecipeOutput output, Item dye, ItemLike result) {
        ShapelessRecipeBuilder.shapeless(RecipeCategory.BUILDING_BLOCKS, result, 1)
                .requires(Items.BRICKS)
                .requires(dye)
                .group("bricks_dye")
                .unlockedBy("has_bricks", has(Items.BRICKS))
                .save(output);
    }

    private void createStairsRecipe(RecipeOutput output, ItemLike input, ItemLike result) {
        ShapedRecipeBuilder.shaped(
                        RecipeCategory.BUILDING_BLOCKS,
                        result,
                        4
                )
                .pattern("#  ")
                .pattern("## ")
                .pattern("###")
                .define('#', input)
                .group("wool_stairs")
                .unlockedBy("has_input", has(input))
                .save(output);
    }

    private void createSlabRecipe(RecipeOutput output, ItemLike input, ItemLike result) {
        ShapedRecipeBuilder.shaped(
                        RecipeCategory.BUILDING_BLOCKS,
                        result,
                        6
                )
                .pattern("###")
                .define('#', input)
                .group("wool_slabs")
                .unlockedBy("has_input", has(input))
                .save(output);
    }

    private void createBrickRecipe(RecipeOutput output, ItemLike input, ItemLike result) {
        ShapedRecipeBuilder.shaped(
                        RecipeCategory.BUILDING_BLOCKS,
                        result,
                        4
                )
                .pattern("##")
                .pattern("##")
                .define('#', input)
                .group("Bricks")
                .unlockedBy("has_input", has(input))
                .save(output);
    }
}