{
	"format_version": "1.19.50",
	"minecraft:entity": {
		"description": {
			"identifier": "ldz:ender_beast",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false,
			"animations": {
				"ctrl.attack": "controller.animation.ender_beast.attack",
				"attack": "animation.ender_beast.attack",
				"summon_end_force_power_4": "animation.generic.summon_end_force_power_4",
				"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",
					"ctrl.attack",
					{
						"summon_end_force_power_4": "!q.is_alive"
					}
				]
			},
			"properties": {
				"ldz:punch_side": {
					"type": "int",
					"range": [
						1,
						2
					],
					"default": 1,
					"client_sync": true
				},
				"ldz:ice_overlay": {
					"type": "bool",
					"client_sync": true,
					"default": false
				}
			}
		},
		"component_groups": {
			"ice_overlay": {				
				"minecraft:is_shaking": {}
			},
			"instant_despawn": {
				"minecraft:instant_despawn": {}
			}
		},
		"components": {
			"minecraft:type_family": {
				"family": [
					"ender",
					"ender_beast",
					"ldz",
					"monster",
					"mob"
				]
			},
			"minecraft:environment_sensor": {
				"triggers": [
					{
						"filters": {
							"any_of": [
								{ "test": "is_difficulty", "value": "peaceful" },
								{ "test": "distance_to_nearest_player", "operator": ">=", "value": 70 }
							]
						},
						"event": "despawn"
					}
				]
			},
			"minecraft:damage_sensor": {
				"triggers": [
					{
						"on_damage": {
							"filters": {
								"test": "has_damage",
								"value": "void"
							},
							"event": "despawn"
						},
						"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:knockback_resistance": {
				"value": 0.5,
				"maximum": 0.5
			},
			"minecraft:movement": {
				"value": 0.2
			},
			"minecraft:breathable": {
				"total_supply": 15,
				"suffocate_time": 0
			},
			"minecraft:nameable": {},
			"minecraft:loot": {
				"table": "loot_tables/entities/ender_beast.json"
			},
			"minecraft:health": {
				"value": 50,
				"max": 50
			},
			"minecraft:hurt_on_condition": {
				"damage_conditions": [
					{
						"filters": {
							"test": "in_lava",
							"subject": "self",
							"operator": "==",
							"value": true
						},
						"cause": "lava",
						"damage_per_tick": 4
					},
					{
						"filters": {
							"test": "in_water_or_rain",
							"operator": "==",
							"value": true
						},
						"cause": "drowning",
						"damage_per_tick": 1
					}
				]
			},
			"minecraft:attack": {
				"damage": 6
			},
			"minecraft:follow_range": {
				"value": 32,
				"max": 32
			},
			"minecraft:collision_box": {
				"width": 2.3,
				"height": 2.2
			},
			"minecraft:despawn": {
				"despawn_from_distance": {}
			},
			"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"
								},
								{
									"test": "is_family",
									"subject": "other",
									"value": "wandering_trader"
								}
							]
						},
						"max_dist": 20
					},
					{
						"filters": {
							"all_of": [
								{
									"test": "is_family",
									"subject": "other",
									"value": "villager"
								},
								{
									"test": "has_component",
									"subject": "other",
									"operator": "!=",
									"value": "minecraft:is_baby"
								}
							]
						},
						"max_dist": 20
					}
				],
				"must_see": true
			},
			"minecraft:navigation.walk": {
				"can_path_over_water": false,
				"avoid_water": true
			},
			"minecraft:movement.basic": {},
			"minecraft:jump.static": {},
			"minecraft:can_climb": {},
			"minecraft:behavior.float": {
				"priority": 4
			},
			"minecraft:behavior.delayed_attack": {
				"priority": 2,
				"track_target": true,
				"attack_duration": 0.8,
				"hit_delay_pct": 0.6,
				"reach_multiplier": 1.3
			},
			"minecraft:behavior.random_stroll": {
				"priority": 7,
				"speed_multiplier": 1
			},
			"minecraft:behavior.look_at_player": {
				"priority": 8,
				"look_distance": 16,
				"probability": 1
			},
			"minecraft:behavior.random_look_around": {
				"priority": 8
			},
			"minecraft:behavior.hurt_by_target": {
				"priority": 3
			},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:conditional_bandwidth_optimization": {
				"default_values": {
					"max_optimized_distance": 80,
					"max_dropped_ticks": 10,
					"use_motion_prediction_hints": true
				}
			},
			"minecraft:behavior.look_at_target": {
				"priority": 2,
				"look_distance": 16,
				"probability": 1
			}
		},
		"events": {
			"set_punch_side_to_1": {
				"set_property": {
					"ldz:punch_side": 1
				}
			},
			"set_punch_side_to_2": {
				"set_property": {
					"ldz:punch_side": 2
				}
			},
			"despawn": {
				"add": {
					"component_groups": [
						"instant_despawn"
					]
				}
			},
			"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"
					]
				}
			}
		}
	}
}