{
	"format_version": "1.21.30",
	"minecraft:entity": {
		"description": {
			"identifier": "scpcf:scp_1048",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false
		},
		"component_groups": {
			"scp1048drawing": {
				"minecraft:transformation": {
					"into": "scpcf:scp_1048_drawing"
				}
			},
			"scp1048building1": {
				"minecraft:transformation": {
					"into": "scpcf:scp_1048_building_1"
				}
			},
			"scp1048building2": {
				"minecraft:transformation": {
					"into": "scpcf:scp_1048_building_2"
				}
			},
			"scp1048building3": {
				"minecraft:transformation": {
					"into": "scpcf:scp_1048_building_3"
				}
			},
			"scp1048building4": {
				"minecraft:transformation": {
					"into": "scpcf:scp_1048_building_4"
				}
			},
			"lookforflesh": {
				"minecraft:behavior.pickup_items": {
					"priority": 1,
					"max_dist": 20,
					"goal_radius": 2,
					"speed_multiplier": 1,
					"pickup_based_on_chance": false,
					"can_pickup_any_item": false
				},
				"minecraft:behavior.equip_item": {
					"priority": 2
				},
				"minecraft:equip_item": {},
				"minecraft:behavior.admire_item": {
					"priority": 2,
					"on_admire_item_stop": {
						"event": "scp1048summonscp1048aorb"
					},
					"on_admire_item_start": {
						"event": "rottenflesh"
					}
				},
				"minecraft:admire_item": {
					"duration": 2,
					"spawn_event": "scp1048summonscp1048aorb"
				},
				"minecraft:timer": {
					"looping": false,
					"time": 10,
					"time_down_event": {
						"event": "lookforironingot"
					}
				},
				"minecraft:shareables": {
					"items": [
						{
							"item": "minecraft:rotten_flesh",
							"max_amount": 1,
							"priority": 2,
							"admire": true
						}
					]
				},
				"minecraft:variant": {
					"value": 0
				}
			},
			"lookforironingot": {
				"minecraft:shareables": {
					"items": [
						{
							"item": "minecraft:iron_ingot",
							"pickup_limit": 1,
							"admire": true
						}
					]
				},
				"minecraft:behavior.pickup_items": {
					"priority": 1,
					"max_dist": 20,
					"goal_radius": 2,
					"speed_multiplier": 1,
					"pickup_based_on_chance": false,
					"can_pickup_any_item": false
				},
				"minecraft:behavior.equip_item": {
					"priority": 2
				},
				"minecraft:behavior.admire_item": {
					"priority": 2,
					"on_admire_item_stop": {
						"event": "scp1048summonscp1048c"
					},
					"on_admire_item_start": {
						"event": "ironingot"
					}
				},
				"minecraft:admire_item": {
					"duration": 2,
					"spawn_event": "scp1048summonscp1048c",
					"cooldown_after_being_attacked": 1
				},
				"minecraft:timer": {
					"looping": false,
					"time": 10,
					"time_down_event": {
						"event": "lookforflesh"
					}
				},
				"minecraft:equip_item": {},
				"minecraft:variant": {
					"value": 0
				}
			},
			"rottenflesh": {
				"minecraft:variant": {
					"value": 1
				}
			},
			"ironingot": {
				"minecraft:variant": {
					"value": 2
				}
			}
		},
		"components": {
			"minecraft:health": {
				"value": 16,
				"max": 16
			},
			"minecraft:navigation.walk": {
				"can_path_over_water": true
			},
			"minecraft:movement.basic": {},
			"minecraft:jump.static": {},
			"minecraft:behavior.random_stroll": {
				"priority": 10,
				"speed_multiplier": 0.6
			},
			"minecraft:behavior.look_at_player": {
				"priority": 11,
				"look_distance": 8
			},
			"minecraft:behavior.random_look_around": {
				"priority": 12
			},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:looked_at": {
				"filters": {
					"all_of": [
						{
							"subject": "other",
							"test": "is_family",
							"value": "player"
						}
					]
				},
				"search_radius": 64,
				"set_target": "once_and_keep_scanning",
				"looked_at_cooldown": 10,
				"look_at_locations": [
					{
					  "location": "head"
					},
					{
					  "location": "body"
					},
					{
					  "location": "feet",
					  "vertical_offset": 0.5
					}
				  ],
				  "field_of_view": 40,
				  "looked_at_event": {
					"event": "scp1048say"
				}
			},
			"minecraft:nameable": {},
			"minecraft:interact": {
				"interactions": [
					{
						"on_interact": {
							"filters": {
								"all_of": [
									{
										"test": "is_family",
										"subject": "other",
										"value": "player"
									},
									{
										"test": "has_equipment",
										"domain": "hand",
										"subject": "other",
										"value": "minecraft:paper"
									}
								]
							},
							"event": "scp1048drawingevent"
						},
						"use_item": true,
						"interact_text": "Give Paper"
					},
					{
						"on_interact": {
							"filters": {
								"all_of": [
									{
										"test": "is_family",
										"subject": "other",
										"value": "player"
									},
									{
										"test": "has_equipment",
										"domain": "hand",
										"subject": "other",
										"value": "minecraft:rotten_flesh"
									}
								]
							},
							"event": "scp1048summonscp1048aorb"
						},
						"use_item": true,
						"interact_text": "Give Rotten Flesh"
					},
					{
						"on_interact": {
							"filters": {
								"all_of": [
									{
										"test": "is_family",
										"subject": "other",
										"value": "player"
									},
									{
										"test": "has_equipment",
										"domain": "hand",
										"subject": "other",
										"value": "minecraft:iron_ingot"
									}
								]
							},
							"event": "scp1048summonscp1048c"
						},
						"use_item": true,
						"interact_text": "Give Iron Ingot"
					},
					{
						"on_interact": {
							"filters": {
								"all_of": [
									{
										"test": "is_family",
										"subject": "other",
										"value": "player"
									},
									{
										"test": "has_equipment",
										"domain": "hand",
										"subject": "other",
										"value": "minecraft:iron_block"
									}
								]
							},
							"event": "scp1048summonscp1048cironblock"
						},
						"use_item": true,
						"interact_text": "Give Iron Block"
					}
				]
			},
			"minecraft:movement": {
				"value": 0.5,
				"max": 0.5
			},
			"minecraft:type_family": {
				"family": [
					"scp"
				]
			},
			"minecraft:breathable": {
				"totalSupply": 10,
				"suffocateTime": 0
			},
			"minecraft:behavior.float": {
				"priority": 2
			},
			"minecraft:experience_reward": {
				"on_death": "query.last_hit_by_player?3:0"
			},
			"minecraft:loot": {
				"table": "loot_tables/scp1048loot.json"
			}
		},
		"events": {
			"scp1048say": {
				"sequence": [
					{
						"randomize": [
							{
								"weight": 9,
								"queue_command": {
									"command": [
										"say Hello, can I please have rotten flesh?"
									]
								}
							},
							{
								"weight": 9,
								"queue_command": {
									"command": [
										"say Hello, can I please have an iron ingot?"
									]
								}
							},
							{
								"weight": 9,
								"queue_command": {
									"command": [
										"say Hello, can I please have paper?"
									]
								}
							},
							{
								"weight": 9,
								"queue_command": {
									"command": [
										"say Hello, can I please have an iron block?"
									]
								}
							}
						]
					}
				]
			},
			"scp1048drawingevent": {
				"add": {
					"component_groups": [
						"scp1048drawing"
					]
				}
			},
			"scp1048summonscp1048aorb": {
				"sequence": [
					{
						"randomize": [
							{
								"weight": 9,
								"add": {
									"component_groups": [
										"scp1048building1"
									]
								}
							},
							{
								"weight": 9,
								"add": {
									"component_groups": [
										"scp1048building2"
									]
								}
							}
						]
					}
				]
			},
			"scp1048summonscp1048c": {
				"add": {
					"component_groups": [
						"scp1048building3"
					]
				}
			},
			"scp1048summonscp1048cironblock": {
				"add": {
					"component_groups": [
						"scp1048building4"
					]
				}
			},
			"lookforflesh": {
				"add": {
					"component_groups": [
						"lookforflesh"
					]
				},
				"remove": {
					"component_groups": [
						"lookforironingot"
					]
				}
			},
			"lookforironingot": {
				"add": {
					"component_groups": [
						"lookforironingot"
					]
				},
				"remove": {
					"component_groups": [
						"lookforflesh"
					]
				}
			},
			"minecraft:entity_spawned": {
				"randomize": [
					{
						"weight": 10,
						"add": {
							"component_groups": [
								"lookforflesh"
							]
						},
						"remove": {
							"component_groups": [
								"lookforironingot"
							]
						}
					},
					{
						"weight": 10,
						"add": {
							"component_groups": [
								"lookforironingot"
							]
						},
						"remove": {
							"component_groups": [
								"lookforflesh"
							]
						}
					}
				]
			},
			"minecraft:entity_transformed": {
				"randomize": [
					{
						"weight": 10,
						"add": {
							"component_groups": [
								"lookforflesh"
							]
						},
						"remove": {
							"component_groups": [
								"lookforironingot"
							]
						}
					},
					{
						"weight": 10,
						"add": {
							"component_groups": [
								"lookforironingot"
							]
						},
						"remove": {
							"component_groups": [
								"lookforflesh"
							]
						}
					}
				]
			},
			"rottenflesh": {
				"add": {
					"component_groups": [
						"rottenflesh"
					]
				},
				"run_command": {
					"command": [
						"particle minecraft:crop_growth_emitter ~~0.8~"
					],
					"target": "self"
				}
			},
			"ironingot": {
				"add": {
					"component_groups": [
						"ironingot"
					]
				},
				"run_command": {
					"command": [
						"particle minecraft:crop_growth_emitter ~~0.8~"
					],
					"target": "self"
				}
			}
		}
	}
}