{
	"format_version": "1.21.30",
	"minecraft:entity": {
		"description": {
			"identifier": "scpcf:scp_3199",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false,
			"scripts": {
				"animate": [
					"vomit_controller"
				]
			},
			"animations": {
				"vomit_controller": "controller.animation.scp3199.vomit",
				"vomit": "animation.scp3199.vomit"
			}
		},
		"component_groups": {
			"eggvomittimer": {
				"minecraft:timer": {
					"looping": false,
					"time": [
						60,
						120
					],
					"time_down_event": {
						"event": "scp3199startvomit",
						"target": "self"
					}
				}
			},
			"stopvomitegg": {
				"minecraft:angry": {
					"duration": 40,
					"broadcast_anger": true,
					"broadcast_range": 42,
					"broadcast_targets": [
						"scp3199"
					],
					"calm_event": {
						"event": "scp3199startvomit",
						"target": "self"
					}
				}
			},
			"vomitegg": {
				"minecraft:is_sheared": {}
			},
			"inactive": {
				"minecraft:movement": {
					"value": 0
				}
			},
			"active": {
				"minecraft:movement": {
					"value": 0.6
				},
				"minecraft:movement.basic": {},
				"minecraft:behavior.random_stroll": {
					"priority": 6,
					"speed_multiplier": 0.4
				}
			},
			"inwater": {
				"minecraft:environment_sensor": {
					"triggers": [
						{
							"filters": [
								{
									"any_of": [
										{
											"test": "in_water",
											"subject": "self",
											"operator": "==",
											"value": false
										}
									]
								}
							],
							"event": "scp3199notinwater"
						}
					]
				}
			},
			"notinwater": {
				"minecraft:environment_sensor": {
					"triggers": [
						{
							"filters": [
								{
									"any_of": [
										{
											"test": "in_water",
											"subject": "self",
											"operator": "==",
											"value": true
										}
									]
								}
							],
							"event": "scp3199inwater"
						}
					]
				}
			}
		},
		"components": {
			"minecraft:type_family": {
				"family": [
					"scp"
				]
			},
			"minecraft:health": {
				"value": 40,
				"max": 40
			},
			"minecraft:attack": {
				"damage": 10
			},
			"minecraft:behavior.nearest_attackable_target": {
				"priority": 1,
				"within_radius": 32,
				"reselect_targets": true,
				"entity_types": [
					{
						"filters": {
							"other_with_families": [
								"player",
								"animal",
								"mob",
								"recontainhuman",
								"mtfepsilon11",
								"recontainhumanfriendly"
							]
						},
						"max_dist": 32
					}
				],
				"must_see": true
			},
			"minecraft:behavior.melee_attack": {
				"priority": 1,
				"speed_multiplier": 0.8
			},
			"minecraft:can_climb": {},
			"minecraft:jump.static": {},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:navigation.walk": {
				"can_float": true,
				"is_amphibious": true,
				"can_path_over_water": true,
				"avoid_damage_blocks": true,
				"can_pass_doors": true,
				"can_open_doors": false,
				"avoid_water": true
			},
			"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": "scpcf:acrylic_resin"
								}
							]
						},
						"target": "self",
						"event": "scp3199resin"
					},
					"hurt_item": 1,
					"swing": true,
					"interact_text": "Stop SCP-3199 From Vomiting Eggs"
				}
			},
			"minecraft:behavior.look_at_player": {
				"priority": 7,
				"look_distance": 6,
				"probability": 0.02
			},
			"minecraft:behavior.random_look_around": {
				"priority": 7
			},
			"minecraft:experience_reward": {
				"on_death": "query.last_hit_by_player?15:0"
			},
			"minecraft:loot": {
				"table": "loot_tables/entities/chicken.json"
			}
		},
		"events": {
			"minecraft:entity_spawned": {
				"add": {
					"component_groups": [
						"eggvomittimer",
						"active",
						"notinwater"
					]
				}
			},
			"minecraft:entity_transformed": {
				"add": {
					"component_groups": [
						"eggvomittimer",
						"active",
						"notinwater"
					]
				}
			},
			"scp3199stop": {
				"add": {
					"component_groups": [
						"inactive"
					]
				},
				"remove": {
					"component_groups": [
						"active"
					]
				}
			},
			"scp3199active": {
				"add": {
					"component_groups": [
						"active"
					]
				},
				"remove": {
					"component_groups": [
						"inactive"
					]
				}
			},
			"scp3199eggvomit": {
				"add": {
					"component_groups": [
						"eggvomittimer"
					]
				},
				"remove": {
					"component_groups": [
						"stopvomitegg"
					]
				}
			},
			"scp3199stopeggvomit": {
				"remove": {
					"component_groups": [
						"eggvomittimer"
					]
				},
				"add": {
					"component_groups": [
						"stopvomitegg"
					]
				}
			},
			"scp3199startvomit": {
				"add": {
					"component_groups": [
						"vomitegg"
					]
				},
				"remove": {
					"component_groups": [
						"eggvomittimer"
					]
				}
			},
			"scp3199stopvomit": {
				"add": {
					"component_groups": [
						"eggvomittimer"
					]
				},
				"remove": {
					"component_groups": [
						"vomitegg"
					]
				}
			},
			"scp3199resin": {
				"remove": {
					"component_groups": [
						"eggvomittimer",
						"stopvomitegg",
						"inwater",
						"notinwater"
					]
				},
				"queue_command": {
					"command": [
						"playsound mob.slime.squish @a[r=10]"
					]
				}
			},
			"scp3199notinwater": {
				"add": {
					"component_groups": [
						"notinwater",
						"eggvomittimer",
						"active"
					]
				},
				"remove": {
					"component_groups": [
						"inwater",
						"inactive"
					]
				}
			},
			"scp3199inwater": {
				"add": {
					"component_groups": [
						"inwater",
						"inactive"
					]
				},
				"remove": {
					"component_groups": [
						"notinwater",
						"eggvomittimer",
						"active"
					]
				}
			}
		}
	}
}