{
	"format_version": "1.20.30",
	"minecraft:block": {
		"description": {
			"identifier": "farmersdelight:organic_compost",
			"menu_category": {
				"category": "items",
				"group": "itemGroup.name.farmersdelight_dirt"
			},
			"states": {
				"block:compost": [
					0,
					1,
					2,
					3,
					4
				]
			}
		},
		"components": {
			"minecraft:material_instances": {
				"*": {
					"render_method": "alpha_test",
					"texture": "organic_compost_stage0"
				}
			},
			"minecraft:geometry": "geometry.block",
			"minecraft:destructible_by_mining": {
				"seconds_to_destroy": 0.5
			},
			"minecraft:random_ticking": {
				"on_tick": {
					"event": "compost"
				}
			}
		},
		"permutations": [
			{
				"condition": "query.block_state('block:compost') == 1",
				"components": {
					"minecraft:material_instances": {
						"*": {
							"render_method": "alpha_test",
							"texture": "organic_compost_stage1"
						}
					}
				}
			},
			{
				"condition": "query.block_state('block:compost') == 2",
				"components": {
					"minecraft:material_instances": {
						"*": {
							"render_method": "alpha_test",
							"texture": "organic_compost_stage2"
						}
					}
				}
			},
			{
				"condition": "query.block_state('block:compost') == 3 || query.block_state('block:compost') == 4 ",
				"components": {
					"minecraft:material_instances": {
						"*": {
							"render_method": "alpha_test",
							"texture": "organic_compost_stage3"
						}
					}
				}
			}
		],
		"events": {
			"compost": {
				"sequence": [
					{
						"set_block_state": {
							"block:compost": "math.min(query.block_state('block:compost') + 1, 4)"
						},
						"run_command": {
							"target": "self",
							"command": [
								"particle farmersdelight:organic_compost ~ ~ ~"
							]
						}
					},
					{
						"condition": "query.block_state('block:compost')==4",
						"set_block": {
							"block_type": "farmersdelight:rich_soil"
						}
					}
				]
			}
		}
	}
}