{
	"format_version": "1.20.30",
	"minecraft:block": {
		"description": {
			"identifier": "farmersdelight:honey_glazed_ham_block",
			"states": {
				"block:rotation": [
					2,
					3,
					4,
					5
				],
				"block:stage": [
					0,
					1,
					2,
					3,
					4,
					5
				]
			}
		},
		"components": {
			"minecraft:material_instances": {
				"*": {
					"render_method": "alpha_test",
					"texture": "honey_glazed_ham_block"
				}
			},
			"minecraft:destructible_by_mining": {
				"seconds_to_destroy": 0.5
			},
			"minecraft:on_interact": {
				"event": "stage"
			},
			"minecraft:collision_box": {
				"origin": [
					-6,
					0,
					-6
				],
				"size": [
					12,
					11,
					12
				]
			},
			"minecraft:selection_box": {
				"origin": [
					-6,
					0,
					-6
				],
				"size": [
					12,
					11,
					12
				]
			},
			"minecraft:on_player_placing": {
				"event": "block:rotation"
			},
			"minecraft:loot": "loot_tables/empty.json"
		},
		"events": {
			"stage": {
				"sequence": [
					{
						"condition": "query.block_state('block:stage')==4",
						"sequence": [
							{
								"spawn_loot": {
									"table": "loot_tables/roast_chicken.json"
								}
							},
							{
								"run_command": {
									"command": [
										"playsound use.cloth @a[r=6]"
									],
									"target": "other"
								}
							},
							{
								"set_block": {
									"block_type": "minecraft:air"
								}
							}
						]
					},
					{
						"condition": "query.get_equipped_item_name=='bowl'&&query.block_state('block:stage')!=4",
						"sequence": [
							{
								"decrement_stack": {},
								"condition": "query.block_state('block:stage')!=4"
							},
							{
								"set_block_state": {
									"block:stage": "query.block_state('block:stage') + 1"
								}
							},
							{
								"run_command": {
									"command": [
										"playsound armor.equip_generic @a[r=6]",
										"give @s farmersdelight:honey_glazed_ham"
									],
									"target": "other"
								},
								"condition": "query.block_state('block:stage')!=4"
							}
						]
					},
					{
						"condition": "query.get_equipped_item_name!='bowl'&&query.block_state('block:stage')!=4",
						"run_command": {
							"command": [
								"titleraw @s actionbar {\"rawtext\":[{\"text\":\"\"},{\"translate\":\"need.bowl.deny\"}]}"
							],
							"target": "other"
						}
					}
				]
			},
			"block:rotation": {
				"set_block_state": {
					"block:rotation": "query.cardinal_facing_2d"
				}
			}
		},
		"permutations": [
			{
				"condition": "query.block_state('block:rotation') == 2",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							0,
							0
						]
					}
				}
			},
			{
				"condition": "query.block_state('block:rotation') == 3",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							-180,
							0
						]
					}
				}
			},
			{
				"condition": "query.block_state('block:rotation') == 4",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							90,
							0
						]
					}
				}
			},
			{
				"condition": "query.block_state('block:rotation') == 5",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							-90,
							0
						]
					}
				}
			},
			{
				"condition": "query.block_state('block:stage') == 0",
				"components": {
					"minecraft:collision_box": {
						"origin": [
							-7,
							0,
							-7
						],
						"size": [
							14,
							2,
							14
						]
					},
					"minecraft:selection_box": {
						"origin": [
							-7,
							0,
							-7
						],
						"size": [
							14,
							2,
							14
						]
					},
					"minecraft:geometry": "geometry.honey_glazed_ham_block_stage0"
				}
			},
			{
				"condition": "query.block_state('block:stage') == 1",
				"components": {
					"minecraft:collision_box": {
						"origin": [
							-7,
							0,
							-7
						],
						"size": [
							14,
							2,
							14
						]
					},
					"minecraft:selection_box": {
						"origin": [
							-7,
							0,
							-7
						],
						"size": [
							14,
							2,
							14
						]
					},
					"minecraft:geometry": "geometry.honey_glazed_ham_block_stage1"
				}
			},
			{
				"condition": "query.block_state('block:stage') == 2",
				"components": {
					"minecraft:collision_box": {
						"origin": [
							-7,
							0,
							-7
						],
						"size": [
							14,
							2,
							14
						]
					},
					"minecraft:selection_box": {
						"origin": [
							-7,
							0,
							-7
						],
						"size": [
							14,
							2,
							14
						]
					},
					"minecraft:geometry": "geometry.honey_glazed_ham_block_stage2"
				}
			},
			{
				"condition": "query.block_state('block:stage') == 3",
				"components": {
					"minecraft:collision_box": {
						"origin": [
							-7,
							0,
							-7
						],
						"size": [
							14,
							2,
							14
						]
					},
					"minecraft:selection_box": {
						"origin": [
							-7,
							0,
							-7
						],
						"size": [
							14,
							2,
							14
						]
					},
					"minecraft:geometry": "geometry.honey_glazed_ham_block_stage3"
				}
			},
			{
				"condition": "query.block_state('block:stage') == 4",
				"components": {
					"minecraft:collision_box": {
						"origin": [
							-7,
							0,
							-7
						],
						"size": [
							14,
							2,
							14
						]
					},
					"minecraft:selection_box": {
						"origin": [
							-7,
							0,
							-7
						],
						"size": [
							14,
							2,
							14
						]
					},
					"minecraft:geometry": "geometry.honey_glazed_ham_block_stage4"
				}
			}
		]
	}
}