{
	"format_version": "1.19.50",
	"minecraft:entity": {
		"description": {
			"identifier": "ldz:ender_scourge_spawner",
			"is_spawnable": false,
			"is_summonable": true,
			"is_experimental": false,
			"properties": {
				"ldz:player_spawned": {
					"type": "bool",
					"default": false,
					"client_sync": true
				},
				
				"ldz:ice_overlay": {
					"type": "bool",
					"client_sync": true,
					"default": false
				}
			},
			"animations": {
				"player_spawned": "animation.ender_scourge_spawner.player_spawned",
				"enderman_spawned": "animation.ender_scourge_spawner.enderman_spawned"
			},
			"scripts": {
				"animate": [
					{
						"player_spawned": "q.property('ldz:player_spawned')"
					},
					{
						"enderman_spawned": "!q.property('ldz:player_spawned')"
					}
				]
			}
		},
		"component_groups": {
			"ice_overlay":{
				"minecraft:is_shaking": {}
			},
			
			"instant_despawn": {
				"minecraft:instant_despawn": {}
			}
		},
		"components": {
			"minecraft:type_family": {
				"family": [
					"ldz",
					"projectile",
					"ender_scourge_spawner",
					"ender_scourge_projectile"
				]
			},
			"minecraft:timer": {
				"time": 0.5,
				"looping": true,
				"time_down_event": {
					"event": "despawn"
				}
			},
			"minecraft:environment_sensor": {
				"triggers": [
					{
						"filters": [
							{
								"test": "is_difficulty",
								"value": "peaceful"
							}
						],
						"event": "despawn",
						"target": "self"
					}
				]
			},
			"minecraft:collision_box": {
				"width": 0,
				"height": 0
			},
			"minecraft:health": {
				"value": 999,
				"max": 999
			},
			"minecraft:despawn": {
				"despawn_from_distance": {}
			},
			"minecraft:damage_sensor": {
				"triggers": {
					"cause": "all",
					"deals_damage": false
				}
			},
			"minecraft:physics": {
				"has_collision": false,
				"has_gravity": false
			},
			"minecraft:pushable": {
				"is_pushable": false,
				"is_pushable_by_piston": false
			}
		},
		"events": {
			"add_player_spawned": {
				"set_property": {
					"ldz:player_spawned": true
				}
			},
			"add_enderman_spawned": {
				"set_property": {
					"ldz:player_spawned": false
				}
			},
			"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"
					]
				}
			}
		}
	}
}