{
    "format_version": "1.12.0",
    "minecraft:entity": {
        "description": {
            "identifier": "ldz:ender_gardener_projectile",
            "is_experimental": false,
            "is_spawnable": false,
            "is_summonable": true,
			"animations": {
				"test_for_mob": "animation.ender_gardener_projectile.test_for_mob"
			},
			"scripts": {
				"animate": [
					{ "test_for_mob": "!q.is_illager_captain" }
				]
			}
        },
        "component_groups": {
			"test_for_mob": {
				"minecraft:timer": {
					"time": 0.25,
					"looping": true,
					"time_down_event": {
						"event": "despawn"
					}
				}
			},
			"flower_attack": {
				"minecraft:is_illager_captain": {},
				"minecraft:timer": {
					"time": 0.5,
					"looping": true,
					"time_down_event": {
						"event": "despawn"
					}
				},
				"minecraft:behavior.knockback_roar": {
					"attack_time": 0.05,
                	"cooldown_time": 0,
                	"duration": 0,
               		"knockback_damage": 7,
                	"knockback_horizontal_strength": 0,
                	"knockback_range": 1,
                	"knockback_vertical_strength": 3,
                	"knockback_strength": 0,
                	"knockback_height_cap": 1,
					"damage_filters": [
						{ "test": "is_family", "subject": "other", "operator": "!=", "value": "player" }
					],
					"knockback_filters": [
						{ "test": "is_family", "subject": "other", "operator": "!=", "value": "player" }
					],
					"priority": 0,
					"on_roar_end": { "event": "despawn" }
				}
			},
            "instant_despawn": {
                "minecraft:instant_despawn": {}
            }
        },
        "components": {
			"minecraft:type_family": {
				"family": [
					"ldz",
					"projectile",
					"ender_gardener_projectile"
				]
			},
			"minecraft:environment_sensor": {
				"triggers": [
					{
						"filters": [
							{
								"test": "is_difficulty",
								"value": "peaceful"
							}
						],
						"event": "despawn",
						"target": "self"
					}
				]
			},
			"minecraft:nameable": {},
			"minecraft:health": {
				"value": 999,
				"max": 999
			},
			"minecraft:knockback_resistance": {
				"value": 1,
				"max": 1
			},
			"minecraft:collision_box": {
				"width": 0,
				"height": 0
			},
			"minecraft:persistent": {},
			"minecraft:pushable": {
				"is_pushable": false,
				"is_pushable_by_piston": false
			},
			"minecraft:damage_sensor": {
				"triggers": [
					{
						"on_damage": {
							"filters": { "test": "has_damage", "value": "void" },
							"event": "despawn",
							"target": "self"
						},
						"deals_damage": false
					},
					{
						"cause": "all",
						"deals_damage": false
					}
				]
			}
        },
        "events": {
			"add_test_for_mob":{
				"add": {
					"component_groups": [
						"test_for_mob"
					]
				}
			},
			"add_flower_attack":{
				"add": {
					"component_groups": [
						"flower_attack"
					]
				}
			},
            "despawn": {
                "add": {
                    "component_groups": [
                        "instant_despawn"
                    ]
                }
            }
        }
    }
}