ServerEvents.recipes(event => {

    //blocks
    event.custom({
        type: "lychee:block_interacting",
        "post": [
            {
                "type": "place",
                "block": {
                    "blocks": [
                        "minecraft:magma_block"
                    ]
                }
            },
            {
                "type": "execute",
                "command": "playsound minecraft:block.grass.break player @s ~ ~ ~ 0.75 1.3",
                "hide": true
            },
            {
                "type": "execute",
                "command": "particle minecraft:composter ~ ~0.25 ~ -0.5 0.5 0.5 0.07 12 force",
                "hide": true
            }
        ],
        "item_in": {
            "item": "minecraft:magma_cream"
        },
        "block_in": {
            "blocks": [
                "minecraft:slime_block"
            ]
        }
    })
        .id('lychee:magma_cream/magma')

    event.custom({
        type: "lychee:block_crushing",

        block_in: {
            block: "minecraft:magma_block"
        },

        "falling_block": "minecraft:damaged_anvil",
        "landing_block": "minecraft:magma_block",

        "post": [
            {
                "type": "anvil_damage_chance",
                "chance": 1.0
            },
            {
                "type": "place",
                "block": {
                    "blocks": [
                        "minecraft:lava"
                    ]
                }
            }
        ],
    })
        .id("lychee:test/magma_crush")

    event.custom({
        "type": "lychee:block_interacting",
        "post": [
            {
                "type": "damage_item",
                "damage": 1
            },
            {
                "type": "random",
                "rolls": {
                    "min": 0,
                    "max": 1
                },
                "entries": [
                    {
                        "type": "drop_item",
                        "item": "minecraft:iron_nugget",
                        "count": 1
                    },
                    {
                        "type": "drop_item",
                        "item": "minecraft:iron_nugget",
                        "count": 2
                    },
                    {
                        "type": "drop_item",
                        "item": "minecraft:iron_nugget",
                        "count": 3
                    }
                ],
                "empty_weight": 2
            },
            {
                "type": "execute",
                "command": "particle minecraft:crit ~ ~0.5 ~ -0.5 0.5 0.5 0 7",
                "hide": true
            },
            {
                "type": "execute",
                "command": "/playsound minecraft:item.axe.strip player @p ~ ~ ~ 0.5",
                "hide": true
            },
            {
                "type": "random",
                "rolls": {
                    "min": 0,
                    "max": 1
                },
                "entries": [
                    {
                        "type": "anvil_damage_chance",
                        "chance": 0.20
                    },
                    {
                        "type": "anvil_damage_chance",
                        "chance": 0.05
                    },
                    {
                        "type": "place",
                        "chance": 0.03,
                        "block": {
                            "blocks": [
                                "minecraft:chipped_anvil"
                            ]
                        }
                    }
                ],
                "empty_weight": 18
            }
        ],
        "item_in": {
            "item": "minecraft:wooden_pickaxe"
        },
        "block_in": {
            "blocks": [
                "minecraft:anvil"
            ]
        }
    })
        .id('lychee:mining/anvil_chipped')

    event.custom({
        "type": "lychee:block_interacting",
        "post": [
            {
                "type": "damage_item",
                "damage": 1
            },
            {
                "type": "random",
                "rolls": {
                    "min": 0,
                    "max": 1
                },
                "entries": [
                    {
                        "type": "drop_item",
                        "item": "minecraft:iron_nugget",
                        "count": 1
                    },
                    {
                        "type": "drop_item",
                        "item": "minecraft:iron_nugget",
                        "count": 2
                    },
                    {
                        "type": "drop_item",
                        "item": "minecraft:iron_nugget",
                        "count": 3
                    }
                ],
                "empty_weight": 2
            },
            {
                "type": "execute",
                "command": "particle minecraft:crit ~ ~0.5 ~ -0.5 0.5 0.5 0 7",
                "hide": true
            },
            {
                "type": "execute",
                "command": "/playsound minecraft:item.axe.strip player @p ~ ~ ~ 0.5",
                "hide": true
            },
            {
                "type": "random",
                "rolls": {
                    "min": 0,
                    "max": 1
                },
                "entries": [
                    {
                        "type": "anvil_damage_chance",
                        "chance": 0.20
                    },
                    {
                        "type": "anvil_damage_chance",
                        "chance": 0.05
                    },
                    {
                        "type": "place",
                        "chance": 0.03,
                        "block": {
                            "blocks": [
                                "minecraft:damaged_anvil"
                            ]
                        }
                    }
                ],
                "empty_weight": 18
            }
        ],
        "item_in": {
            "item": "minecraft:wooden_pickaxe"
        },
        "block_in": {
            "blocks": [
                "minecraft:chipped_anvil"
            ]
        }
    })
        .id('lychee:mining/anvil_damaged')

    event.custom({
        "type": "lychee:random_block_ticking",
        "hide_in_viewer": true,
        "contextual": [
            {
                "type": "chance",
                "chance": 0.0085
            },
            {
                "type": "location",
                "predicate": {
                    "dimension": "minecraft:the_nether"
                }
            }
        ],
        "post": [
            {
                "type": "execute",
                "command": "place feature minecraft:crimson_fungus_planted",
                "hide": true
            }
        ],
        "block_in": {
            "blocks": [
                "minecraft:crimson_fungus"
            ]
        }
    })
        .id('lychee:nether/fungus_growing')

    event.custom({
        type: "lychee:block_interacting",
        "comment": "§2Forest§f NOTHING\n§5Try Striping Mushroom Stem blocks",
        post: [
            {
                "type": "add_item_cooldown",
                "s": 0.3
            },
            {
                "type": "damage_item",
                "damage": 1
            },
            {
                "type": "delay",
                "s": 0.10
            },
            {
                "type": "execute",
                "contextual": [{ "type": "chance", "chance": 0.55 }],
                "command": "summon biome_beans:rotten_worm ~ ~-0.25 ~",
                "hide": true
            },
            {
                "type": "execute",
                "command": "particle minecraft:sneeze ~ ~0.15 ~ 0 0 0 0.06 3 force",
                "hide": true
            },
            {
                "type": "execute",
                "command": "playsound minecraft:item.axe.strip player @p ~ ~ ~",
                "hide": true
            },
            {
                "type": "place",
                "block": {
                    "blocks": [
                        "minecraft:air"
                    ]
                }
            }
        ],
        item_in: { "item": "minecraft:wooden_axe" },
        block_in: { "blocks": ["minecraft:mushroom_stem"], "hide": true },
    })
        .id('lychee:wooden_axe/mushroom_stem')

})