{
	"format_version": "1.20.30",
	"minecraft:block": {
		"description": {
			"identifier": "farmersdelight:skillet",
			"menu_category": {
				"category": "items",
				"group": "itemGroup.name.farmersdelight_kitchen"
			},
			"states": {
				"block:rotation": [
					2,
					3,
					4,
					5
				],
				"block:stove_below": [
					false,
					true
				]
			}
		},
		"components": {
			"minecraft:material_instances": {
				"*": {
					"render_method": "alpha_test",
					"texture": "skillet"
				}
			},
			"minecraft:geometry": "geometry.skillet",
			"minecraft:destructible_by_mining": {
				"seconds_to_destroy": 0.5
			},
			"minecraft:on_player_placing": {
				"event": "block:rotation"
			},
			"minecraft:on_placed": {
				"event": "entity"
			},
			"minecraft:selection_box": {
				"origin": [
					-7,
					0,
					-7
				],
				"size": [
					14,
					1,
					14
				]
			},
			"minecraft:collision_box": {
				"origin": [
					-7,
					0,
					-7
				],
				"size": [
					14,
					1,
					14
				]
			},
			"minecraft:light_dampening": 0,
			"minecraft:queued_ticking": {
				"interval_range": [
					0,
					0
				],
				"looping": true,
				"on_tick": {
					"event": "check_stove"
				}
			}
		},
		"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
						]
					}
				}
			}
		],
		"events": {
			"block:rotation": {
				"set_block_state": {
					"block:rotation": "query.cardinal_facing_2d"
				}
			},
			"entity": {
				"run_command": {
					"command": [
						"summon farmersdelight:skillet_entity ~0.17 ~-0.44 ~0.17",
						"summon farmersdelight:skillet_entity ~-0.17 ~-0.44 ~0.17",
						"summon farmersdelight:skillet_entity ~0.17 ~-0.44 ~-0.17",
						"summon farmersdelight:skillet_entity ~-0.17 ~-0.44 ~-0.17"
					]
				}
			},
			"check_stove": {
				"sequence": [
					{
						"condition": "query.block_neighbor_has_any_tag(0,-1,0,'stove_on')",
						"set_block_state": {
							"block:stove_below": true
						}
					},
					{
						"condition": "!query.block_neighbor_has_any_tag(0,-1,0,'stove_on')",
						"set_block_state": {
							"block:stove_below": false
						}
					},
					{
						"condition": "query.block_state('block:stove_below')==true",
						"randomize": [
							{
								"weight": 3,
								"run_command": {
									"target": "self",
									"command": [
										"particle farmersdelight:pot_smoke ~ ~0.1 ~"
									]
								}
							},
							{
								"weight": 91
							}
						]
					}
				]
			}
		}
	}
}