{
	"format_version": "1.16.100",
	"minecraft:entity": {
		"description": {
			"identifier": "farmersdelight:skillet_entity",
			"is_spawnable": false,
			"is_summonable": true,
			"is_experimental": false
		},
		"component_groups": {
			"farmersdelight:kill": {
				"minecraft:transformation": {
					"drop_equipment": true,
					"into": "farmersdelight:skillet_entity",
					"delay": {
						"value": 0.1
					}
				}
			},
			"farmersdelight:cook_timer": {
				"minecraft:timer": {
					"looping": false,
					"time": [
						8,
						8
					],
					"time_down_event": {
						"event": "farmersdelight:cook_filter"
					}
				}
			},
			"farmersdelight:despawn": {
				"minecraft:transformation": {
					"drop_equipment": true,
					"into": "farmersdelight:nothing",
					"delay": {
						"value": 0.1
					}
				}
			}
		},
		"components": {
			"minecraft:collision_box": {
				"width": 0.02,
				"height": 0.01
			},
			"minecraft:type_family": {
				"family": [
					"item"
				]
			},
			"minecraft:movement": {
				"value": 0
			},
			"minecraft:scale": {
				"value": 0.6
			},
			"minecraft:persistent": {},
			"minecraft:pushable": {
				"is_pushable": false,
				"is_pushable_by_piston": false
			},
			"minecraft:physics": {
				"has_gravity": false,
				"has_collision": false
			},
			"minecraft:damage_sensor": {
				"triggers": [
					{
						"cause": "all",
						"deals_damage": false,
						"on_damage": {
							"event": "farmersdelight:hit_kill"
						},
						"on_damage_sound_event": "dig.wood"
					}
				]
			},
			"minecraft:fire_immune": true,
			"minecraft:interact": {
				"interactions": [
					{
						"give_item": true,
						"take_item": true,
						"on_interact": {
							"event": "farmersdelight:cook_timer"
						}
					}
				]
			},
			"minecraft:inventory": {
				"inventory_size": 4,
				"private": true
			},
			"minecraft:health": {
				"value": 1
			},
			"minecraft:inside_block_notifier": {
				"block_list": [
					{
						"block": {
							"name": "farmersdelight:skillet"
						},
						"exited_block_event": {
							"event": "farmersdelight:despawn"
						}
					}
				]
			}
		},
		"events": {
			"farmersdelight:cook_timer": {
				"sequence": [
					{
						"add": {
							"component_groups": [
								"farmersdelight:cook_timer"
							]
						},
						"run_command": {
							"command": [
								"tp ~ ~ ~ facing @p false"
							],
							"target": "self"
						}
					}
				]
			},
			"farmersdelight:cook_filter": {
				"run_command": {
					"command": [
						"execute if block ~ ~ ~ farmersdelight:skillet[\"block:stove_below\"=true,\"block:rotation\"=2] run event entity @s farmersdelight:cook",
						"execute if block ~ ~ ~ farmersdelight:skillet[\"block:stove_below\"=true,\"block:rotation\"=3] run event entity @s farmersdelight:cook",
						"execute if block ~ ~ ~ farmersdelight:skillet[\"block:stove_below\"=true,\"block:rotation\"=4] run event entity @s farmersdelight:cook",
						"execute if block ~ ~ ~ farmersdelight:skillet[\"block:stove_below\"=true,\"block:rotation\"=5] run event entity @s farmersdelight:cook"
					]
				}
			},
			"farmersdelight:cook": {
				"sequence": [
					{
						"run_command": {
							"command": [
								"function cook_farmersdelight"
							],
							"target": "self"
						},
						"add": {
							"component_groups": [
								"farmersdelight:kill"
							]
						}
					}
				]
			},
			"farmersdelight:hit_kill": {
				"sequence": [
					{
						"add": {
							"component_groups": [
								"farmersdelight:kill"
							]
						}
					},
					{
						"run_command": {
							"command": [
								"fill ~ ~ ~ ~ ~ ~ air destroy"
							]
						}
					}
				]
			},
			"farmersdelight:despawn": {
				"add": {
					"component_groups": [
						"farmersdelight:despawn"
					]
				}
			},
			"minecraft:entity_transformed": {
				"run_command": {
					"command": [
						"tp @e[type=item,r=0.6] ~ ~0.2 ~"
					],
					"target": "self"
				}
			}
		}
	}
}