{
	"format_version": "1.16.0",
	"minecraft:entity": {
		"description": {
			"identifier": "minecraft:witch",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false,
			"properties": {
				"ldz:ice_overlay": {
					"type": "bool",
					"client_sync": true,
					"default": false
				}
			},
			"animations": {
				"ctrl.ice_timer": "controller.animation.vanilla.ice_timer",
				"ice_timer": "animation.vanilla.ice_timer",
				"ice_damage": "animation.vanilla.ice_damage"
			},
			"scripts": {
				"animate": [
					"ctrl.ice_timer"
				]
			}
		},
		"component_groups": {
			"ice_overlay": {
				"minecraft:is_shaking": {}
			},
			"minecraft:celebrate": {
				"minecraft:behavior.celebrate": {
					"priority": 5,
					"celebration_sound": "celebrate",
					"sound_interval": {
						"range_min": 2,
						"range_max": 7
					},
					"jump_interval": {
						"range_min": 1,
						"range_max": 3.5
					},
					"duration": 30,
					"on_celebration_end_event": {
						"event": "minecraft:stop_celebrating",
						"target": "self"
					}
				}
			},
			"minecraft:raid_configuration": {
				"minecraft:dweller": {
					"dwelling_type": "village",
					"dweller_role": "hostile",
					"update_interval_base": 60,
					"update_interval_variant": 40,
					"can_find_poi": false,
					"can_migrate": true,
					"first_founding_reward": 0
				},
				"minecraft:behavior.move_to_village": {
					"priority": 3,
					"speed_multiplier": 1.2,
					"goal_radius": 2
				},
				"minecraft:ambient_sound_interval": {
					"value": 2,
					"range": 4,
					"event_name": "ambient.in.raid"
				}
			},
			"minecraft:raid_persistence": {
				"minecraft:persistent": {}
			},
			"instant_despawn": {
				"minecraft:instant_despawn": {}
			}
		},
		"components": {
			"minecraft:is_hidden_when_invisible": {},
			"minecraft:experience_reward": {
				"on_death": "query.last_hit_by_player ? (query.is_baby ? 12 : 5) + (Math.die_roll(query.equipment_count,1,3)) : 0"
			},
			"minecraft:breathable": {
				"total_supply": 15,
				"suffocate_time": 0
			},
			"minecraft:nameable": {},
			"minecraft:loot": {
				"table": "loot_tables/entities/witch.json"
			},
			"minecraft:health": {
				"value": 26,
				"max": 26
			},
			"minecraft:hurt_on_condition": {
				"damage_conditions": [
					{
						"filters": {
							"test": "in_lava",
							"subject": "self",
							"operator": "==",
							"value": true
						},
						"cause": "lava",
						"damage_per_tick": 4
					}
				]
			},
			"minecraft:movement": {
				"value": 0.25
			},
			"minecraft:navigation.walk": {
				"can_path_over_water": true,
				"avoid_water": false
			},
			"minecraft:movement.basic": {},
			"minecraft:jump.static": {},
			"minecraft:can_climb": {},
			"minecraft:despawn": {
				"despawn_from_distance": {}
			},
			"minecraft:behavior.float": {
				"priority": 1
			},
			"minecraft:behavior.ranged_attack": {
				"priority": 2,
				"speed_multiplier": 1,
				"attack_interval_min": 3,
				"attack_interval_max": 3,
				"attack_radius": 10
			},
			"minecraft:behavior.random_stroll": {
				"priority": 4,
				"speed_multiplier": 1
			},
			"minecraft:behavior.look_at_player": {
				"priority": 5,
				"look_distance": 8
			},
			"minecraft:behavior.random_look_around": {
				"priority": 5,
				"look_distance": 8
			},
			"minecraft:behavior.hurt_by_target": {
				"priority": 1
			},
			"minecraft:behavior.nearest_attackable_target": {
				"priority": 2,
				"entity_types": [
					{
						"filters": {
							"any_of": [
								{
									"test": "is_family",
									"subject": "other",
									"value": "player"
								},
								{
									"test": "is_family",
									"subject": "other",
									"value": "snowgolem"
								},
								{
									"test": "is_family",
									"subject": "other",
									"value": "irongolem"
								}
							]
						},
						"max_dist": 10
					}
				],
				"must_reach": true
			},
			"minecraft:type_family": {
				"family": [
					"witch",
					"monster",
					"mob"
				]
			},
			"minecraft:collision_box": {
				"width": 0.6,
				"height": 1.9
			},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:follow_range": {
				"value": 64
			},
			"minecraft:conditional_bandwidth_optimization": {}
		},
		"events": {
			"minecraft:spawn_for_raid": {
				"add": {
					"component_groups": [
						"minecraft:raid_configuration",
						"minecraft:raid_persistence"
					]
				}
			},
			"minecraft:start_celebrating": { // Event must be called exactly this for village to fire it when a raid is lost
				"sequence": [
					{
						"add": {
							"component_groups": [
								"minecraft:celebrate"
							]
						}
					},
					{
						"filters": {
							"test": "has_nametag",
							"value": false
						},
						"remove": {
							"component_groups": [
								"minecraft:raid_persistence"
							]
						}
					}
				]
			},
			"minecraft:stop_celebrating": {
				"remove": {
					"component_groups": [
						"minecraft:celebrate"
					]
				}
			},
			"minecraft:raid_expired": {
				"sequence": [
					{
						"filters": {
							"test": "has_nametag",
							"value": false
						},
						"remove": {
							"component_groups": [
								"minecraft:raid_persistence"
							]
						}
					}
				]
			},
			"set_ice_overlay_to_true": {
				"set_property": {
					"ldz:ice_overlay": true
				},
				"add": {
					"component_groups": [
						"ice_overlay"
					]
				}
			},
			"set_ice_overlay_to_false": {
				"set_property": {
					"ldz:ice_overlay": false
				},
				"remove": {
					"component_groups": [
						"ice_overlay"
					]
				}
			},
			"despawn": {
				"add": {
					"component_groups": [
						"instant_despawn"
					]
				}
			}
		}
	}
}