{
	"format_version": "1.20.80",
	"minecraft:entity": {
		"description": {
			"identifier": "v360:ender_cruncher",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false
		},
		"components": {
			"minecraft:is_hidden_when_invisible": {},
			"minecraft:experience_reward": {
				"on_death": "query.last_hit_by_player?5+(query.equipment_count*math.random(1,3)):0"
			},
			"minecraft:nameable": {},
			"minecraft:breathable": {
				"total_supply": 15,
				"suffocate_time": 0,
				"breathes_water": true
			},
			"minecraft:health": {
				"value": 20,
				"max": 20
			},
			"minecraft:collision_box": {
				"width": 0.7,
				"height": 0.7
			},
			"minecraft:attack": {
				"damage": 4
			},
			"minecraft:loot": {
				"table": "loot_tables/ender_cruncher.json"
			},
			"minecraft:movement": {
				"value": 0.3
			},
			"minecraft:navigation.walk": {
				"is_amphibious": true,
				"avoid_sun": true,
				"avoid_water": true
			},
			"minecraft:movement.basic": {},
			"minecraft:jump.static": {},
			"minecraft:can_climb": {},
			"minecraft:scale": {
				"value": 1.5
			},
			"minecraft:despawn": {
				"despawn_from_distance": {}
			},
			"minecraft:behavior.hurt_by_target": {
				"priority": 1
			},
			"minecraft:behavior.nearest_attackable_target": {
				"priority": 2,
				"must_see": true,
				"entity_types": [
					{
						"filters": {
							"test": "is_family",
							"subject": "other",
							"value": "player"
						},
						"max_dist": 16
					},
					{
						"filters": {
							"test": "is_family",
							"subject": "other",
							"value": "irongolem"
						},
						"max_dist": 16
					}
				],
				"reselect_targets": true
			},
			"minecraft:behavior.melee_attack": {
				"priority": 4,
				"track_target": true,
				"speed_multiplier": 1.25,
				"on_attack": {
					"event": "cacoon"
				}
			},
			"minecraft:behavior.random_stroll": {
				"priority": 6,
				"speed_multiplier": 1
			},
			"minecraft:behavior.look_at_player": {
				"priority": 7,
				"look_distance": 8
			},
			"minecraft:behavior.random_look_around": {
				"priority": 8
			},
			"minecraft:type_family": {
				"family": [
					"ender_cruncher",
					"monster",
					"mob"
				]
			},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:conditional_bandwidth_optimization": {},
			"minecraft:behavior.leap_at_target": {
				"must_be_on_ground": true,
				"yd": 0.4,
				"priority": 4
			}
		},
		"component_groups": {},
		"events": {
			"cacoon": {
				"randomize": [
					{
						"weight": 70
					},
					{
						"weight": 30,
						"queue_command": {
							"target": "target",
							"command": [
								"fill ~1~2~1~-1~0~-1 v360:cacoon_block"
							]
						}
					}
				]
			}
		}
	}
}