{
	"format_version": "1.16.0",
	"minecraft:entity": {
		"description": {
			"identifier": "ldz:ender_chiller",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false,
			"animations": {
				"ctrl.ice_timer": "controller.animation.vanilla.ice_timer",
				"ice_timer": "animation.vanilla.ice_timer",
				"ice_damage": "animation.vanilla.ice_damage",			
				"summon_end_force_power_5": "animation.generic.summon_end_force_power_5",
				"ctrl.attack": "controller.animation.ender_chiller.attack"
			},
			"scripts": {
				"animate": [
					"ctrl.ice_timer",
					"ctrl.attack",
					{
						"summon_end_force_power_5": "!q.is_alive"
					}
				]
			},
			"properties": {
				"ldz:ice_overlay": {
					"type": "bool",
					"client_sync": true,
					"default": false
				}
			}
		},
		"component_groups": {
			"ice_overlay": {				
				"minecraft:is_shaking": {}
			},
			"instant_despawn": {
				"minecraft:instant_despawn": {}
			},
			"ranged_attack": {
				"minecraft:behavior.ranged_attack": {
					"priority": 2,
					"burst_shots": 1,
					"burst_interval": 6,
					"charge_charged_trigger": 0,
					"charge_shoot_trigger": 1,
					"attack_interval_min": 6,
					"attack_interval_max": 7,
					"attack_radius": 16,
					"ranged_fov": 120
				}
			}
		},
		"components": {
			"minecraft:despawn": {
				"despawn_from_distance": {}
			},
			"minecraft:environment_sensor": {
				"triggers": [
					{
						"filters": [
							{
								"test": "is_difficulty",
								"value": "peaceful"
							}
						],
						"event": "despawn",
						"target": "self"
					},
					{
						"filters": [
							{
								"test": "distance_to_nearest_player",
								"operator": ">",
								"value": 70
							}
						],
						"event": "despawn",
						"target": "self"
					}
				]
			},
			"minecraft:type_family": {
				"family": [
					"ldz",
					"ender",
					"ender_chiller",
					"monster",
					"mob"
				]
			},
			"minecraft:nameable": {},
			"minecraft:collision_box": {
				"width": 0.6,
				"height": 2.9
			},
			"minecraft:loot": {
				"table": "loot_tables/entities/ender_chiller.json"
			},
			"minecraft:health": {
				"value": 40,
				"max": 40
			},
			"minecraft:movement": {
				"value": 0.2
			},
			"minecraft:navigation.walk": {
				"avoid_water": false,
				"can_path_over_water": true,
				"can_swim": true
			},
			"minecraft:movement.basic": {},
			"minecraft:jump.static": {},
			"minecraft:can_climb": {},
			"minecraft:attack": {
				"damage": 2,
				"effect_name": "slowness",
				"effect_duration": 10
			},
			"minecraft:damage_sensor": {
				"triggers": [
					{
						"cause": "fall",
						"deals_damage": false
					},
					{
						"cause": "freezing",
						"deals_damage": false
					},
					{
						"on_damage": {
							"filters": {
								"any_of":[
									{ "test": "has_equipment", "subject": "other", "domain": "hand", "value": "minecraft:iron_axe" },
									{ "test": "has_equipment", "subject": "other", "domain": "hand", "value": "minecraft:iron_sword" },
									{ "test": "has_equipment", "subject": "other", "domain": "hand", "value": "minecraft:gold_sword" },
									{ "test": "has_equipment", "subject": "other", "domain": "hand", "value": "minecraft:diamond_sword" },
									{ "test": "has_equipment", "subject": "other", "domain": "hand", "value": "minecraft:netherite_sword" }
								]
							}
						},
						"damage_multiplier": 0.75
					},
					{
						"on_damage": {
							"filters": {
								"test": "is_family",
								"subject": "other",
								"value": "player_lord_wisp"
							},
							"target": "other",
							"event": "add_1_to_hits"
						}
					}
				]
			},
			"minecraft:hurt_on_condition": {
				"damage_conditions": [
					{
						"filters": {
							"test": "in_lava",
							"subject": "self",
							"operator": "==",
							"value": true
						},
						"cause": "lava",
						"damage_per_tick": 4
					}
				]
			},
			"minecraft:behavior.rise_to_liquid_level": {
				"priority": 0,
				"liquid_y_offset": 0,
				"rise_delta": 0.5
			},
			"minecraft:behavior.nearest_prioritized_attackable_target": {
				"priority": 2,
				"attack_interval": 1,
				"reselect_targets": true,
				"target_search_height": -1,
				"within_radius": 16,
				"must_see": true,
				"entity_types": [
					{
						"filters": {
							"all_of": [
								{
									"test": "is_family",
									"subject": "other",
									"value": "player"
								}
							]
						},
						"max_dist": 16,
						"priority": 2
					}
				]
			},
			"minecraft:shooter": {
				"def": "ldz:chill_blast_projectile"
			},
			"minecraft:behavior.move_towards_target": {
				"priority": 3,
				"within_radius": 5
			},
			"minecraft:behavior.random_stroll": {
				"priority": 4,
				"speed_multiplier": 1
			},
			"minecraft:behavior.look_at_player": {
				"priority": 8,
				"look_distance": 16,
				"probability": 1
			},
			"minecraft:behavior.random_look_around": {
				"priority": 6
			},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:behavior.look_at_target": {
				"priority": 2,
				"look_distance": 16,
				"probability": 1
			}
		},
		"events": {
			"minecraft:entity_spawned": {
				"add": {
					"component_groups": [
						"ranged_attack"
					]
				}
			},
			"despawn": {
				"add": {
					"component_groups": [
						"instant_despawn"
					]
				}
			},
			"add_ranged_attack": {
				"add": {
					"component_groups": [
						"ranged_attack"
					]
				}
			},
			"remove_ranged_attack": {
				"remove": {
					"component_groups": [
						"ranged_attack"
					]
				}
			},
			"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"
					]
				}
			}
		}
	}
}