{
	"format_version": "1.19.40",
	"minecraft:entity": {
		"description": {
			"identifier": "agp:player_movement",
			"is_spawnable": false,
			"is_summonable": true,
			"is_experimental": false,
			"scripts": {
				"animate": [
					"TagPU",
					"HasPU",
					"RU",
					"GFM",
					"PR",
					"TagPR",
					"RA"
				]
			},
			"animations": {
				"TagPU": "animation.TagPU",
				"HasPU": "animation.HasPU",
				"RU": "animation.RU",
				"GFM": "animation.GFM",
				"PR": "animation.PR",
				"TagPR": "animation.TagPR",
				"RA": "animation.RA"
			}
		},
		"component_groups": {
			"SetUpMovementDrag": {
				"minecraft:rideable": {
					"priority": 0,
					"controlling_seat": 1,
					"seat_count": 1,
					"crouching_skip_interact": true,
					"pull_in_entities": true,
					"rider_can_interact": false,
					"family_types": [
						"player"
					],
					"seats": [
						{
							"min_rider_count": 0,
							"max_rider_count": 1,
							"position": [
								0,
								0.05,
								0
							]
						}
					]
				},
				"minecraft:input_ground_controlled": {}
			},
			"SetUpMovementLift": {
				"minecraft:rideable": {
					"seat_count": 2,
					"pull_in_entities": false,
					"family_types": [
						"player",
						"LT"
					],
					"seats": [
						{
							"min_rider_count": 0,
							"max_rider_count": 1,
							"position": [
								0,
								0.05,
								0
							]
						},
						{
							"min_rider_count": 1,
							"max_rider_count": 2,
							"position": [
								0,
								1.7,
								3
							]
						}
					]
				}
			},
			"SetupDragWeak": {
				"minecraft:collision_box": {
					"width": 0.6,
					"height": 2
				},
				"minecraft:movement": {
					"value": 0.17
				},
				"minecraft:type_family": {
					"family": [
						"inanimate",
						"agp",
						"player_drag",
						"Dpia"
					]
				},
				"minecraft:environment_sensor": {
					"triggers": [
						{
							"filters": {
								"all_of": [
									{
										"test": "rider_count",
										"subject": "self",
										"operator": "==",
										"value": 0
									},
									{
										"test": "distance_to_nearest_player",
										"subject": "self",
										"operator": ">",
										"value": 12
									}
								],
								"none_of": [
									{
										"all_of": [
											{
												"test": "rider_count",
												"subject": "self",
												"operator": "==",
												"value": 1
											},
											{
												"test": "distance_to_nearest_player",
												"subject": "self",
												"operator": "<=",
												"value": 12
											}
										]
									}
								]
							},
							"event": "Despawn"
						},
						{
							"filters": {
								"all_of": [
									{
										"test": "has_target",
										"operator": "==",
										"value": false
									},
									{
										"test": "is_family",
										"operator": "==",
										"value": "Able"
									}
								]
							},
							"event": "Despawn"
						},
						{
							"filters": {
								"all_of": [
									{
										"test": "is_underground",
										"operator": "!=",
										"value": true
									},
									{
										"test": "has_tag",
										"operator": "!=",
										"value": "Check1"
									}
								]
							},
							"event": "CountdownWeak"
						},
						{
							"filters": {
								"test": "rider_count",
								"subject": "self",
								"operator": "==",
								"value": 0
							},
							"event": "CG"
						},
						{
							"filters": {
								"test": "rider_count",
								"subject": "self",
								"operator": "==",
								"value": 1
							},
							"event": "NoCG"
						}
					]
				},
				"minecraft:behavior.nearest_attackable_target": {
					"priority": 0,
					"reselect_targets": false,
					"set_persistent": true,
					"entity_types": {
						"max_dist": 60,
						"filters": {
							"test": "is_family",
							"subject": "other",
							"value": "tornado"
						}
					},
					"must_see": false,
					"within_radius": 60
				},
				"minecraft:follow_range": {
					"max": 60,
					"value": 60
				}
			},
			"SetupDragStrong": {
				"minecraft:collision_box": {
					"width": 0.6,
					"height": 2
				},
				"minecraft:movement": {
					"value": 0.17
				},
				"minecraft:type_family": {
					"family": [
						"inanimate",
						"agp",
						"player_drag",
						"Dpia"
					]
				},
				"minecraft:environment_sensor": {
					"triggers": [
						{
							"filters": {
								"all_of": [
									{
										"test": "rider_count",
										"subject": "self",
										"operator": "==",
										"value": 0
									},
									{
										"test": "distance_to_nearest_player",
										"subject": "self",
										"operator": ">",
										"value": 12
									}
								],
								"none_of": [
									{
										"all_of": [
											{
												"test": "rider_count",
												"subject": "self",
												"operator": "==",
												"value": 1
											},
											{
												"test": "distance_to_nearest_player",
												"subject": "self",
												"operator": "<=",
												"value": 12
											}
										]
									}
								]
							},
							"event": "Despawn"
						},
						{
							"filters": {
								"all_of": [
									{
										"test": "has_target",
										"operator": "==",
										"value": false
									},
									{
										"test": "is_family",
										"operator": "==",
										"value": "Able"
									}
								]
							},
							"event": "Despawn"
						},
						{
							"filters": {
								"all_of": [
									{
										"test": "is_underground",
										"operator": "!=",
										"value": true
									},
									{
										"test": "has_tag",
										"operator": "!=",
										"value": "Check1"
									}
								]
							},
							"event": "CountdownStrong"
						},
						{
							"filters": {
								"test": "rider_count",
								"subject": "self",
								"operator": "==",
								"value": 0
							},
							"event": "CG"
						},
						{
							"filters": {
								"test": "rider_count",
								"subject": "self",
								"operator": "==",
								"value": 1
							},
							"event": "NoCG"
						}
					]
				},
				"minecraft:behavior.nearest_attackable_target": {
					"priority": 0,
					"reselect_targets": false,
					"set_persistent": true,
					"entity_types": {
						"max_dist": 120,
						"filters": {
							"test": "is_family",
							"subject": "other",
							"value": "tornado"
						}
					},
					"must_see": false,
					"within_radius": 120
				},
				"minecraft:follow_range": {
					"max": 120,
					"value": 120
				}
			},
			"SetupLift": {
				"minecraft:collision_box": {
					"width": 0.82,
					"height": 1
				},
				"minecraft:movement": {
					"value": 0.17
				},
				"minecraft:type_family": {
					"family": [
						"inanimate",
						"agp",
						"player_air",
						"pia"
					]
				},
				"minecraft:environment_sensor": {
					"triggers": [
						{
							"filters": {
								"all_of": [
									{
										"test": "rider_count",
										"subject": "self",
										"operator": "==",
										"value": 0
									},
									{
										"test": "distance_to_nearest_player",
										"subject": "self",
										"operator": ">",
										"value": 25
									}
								],
								"none_of": [
									{
										"all_of": [
											{
												"test": "rider_count",
												"subject": "self",
												"operator": "==",
												"value": 1
											},
											{
												"test": "distance_to_nearest_player",
												"subject": "self",
												"operator": "<=",
												"value": 25
											}
										]
									}
								]
							},
							"event": "Despawn"
						},
						{
							"filters": {
								"test": "rider_count",
								"subject": "self",
								"operator": "==",
								"value": 0
							},
							"event": "CG"
						},
						{
							"filters": {
								"test": "rider_count",
								"subject": "self",
								"operator": "==",
								"value": 1
							},
							"event": "NoCG"
						}
					]
				},
				"minecraft:behavior.nearest_attackable_target": {
					"priority": 0,
					"reselect_targets": false,
					"set_persistent": true,
					"entity_types": {
						"max_dist": 20,
						"filters": {
							"test": "is_family",
							"subject": "other",
							"value": "LT"
						}
					},
					"must_see": false,
					"within_radius": 20
				},
				"minecraft:follow_range": {
					"max": 20,
					"value": 20
				}
			},
			"TimeDespawn": {
				"minecraft:timer": {
					"looping": false,
					"time": [
						21,
						39
					],
					"time_down_event": {
						"event": "Despawn",
						"target": "self"
					}
				}
			},
			"TimeLaunchWeak": {
				"minecraft:timer": {
					"looping": false,
					"time": [
						21,
						39
					],
					"time_down_event": {
						"event": "LD_LiftWeak",
						"target": "self"
					}
				}
			},
			"TimeLaunchStrong": {
				"minecraft:timer": {
					"looping": false,
					"time": [
						21,
						39
					],
					"time_down_event": {
						"event": "LD_LiftStrong",
						"target": "self"
					}
				}
			},
			"CountdownTimerWeak": {
				"minecraft:timer": {
					"looping": false,
					"time": [
						0.5,
						1
					],
					"time_down_event": {
						"event": "Become_PAW",
						"target": "self"
					}
				}
			},
			"CountdownTimerStrong": {
				"minecraft:timer": {
					"looping": false,
					"time": [
						0.5,
						1
					],
					"time_down_event": {
						"event": "Become_PAS",
						"target": "self"
					}
				}
			},
			"TransformPAW": {
				"minecraft:transformation": {
					"into": "agp:player_movement<LiftWeak>"
				}
			},
			"TransformPAS": {
				"minecraft:transformation": {
					"into": "agp:player_movement<LiftStrong>"
				}
			},
			"GetFam_Drag": {
				"minecraft:type_family": {
					"family": [
						"inanimate",
						"agp",
						"player_drag",
						"Dpia",
						"Able"
					]
				}
			},
			"Launch": {
				"minecraft:addrider": {
					"entity_type": "agp:launch_target"
				},
				"minecraft:spawn_entity": {
					"entities": [
						{
							"min_wait_time": 1,
							"max_wait_time": 1,
							"single_use": true,
							"spawn_entity": "agp:pl"
						}
					]
				},
				"minecraft:timer": {
					"looping": false,
					"time": [
						3,
						3
					],
					"time_down_event": {
						"event": "Despawn"
					}
				}
			},
			"Launch2": {
				"minecraft:addrider": {
					"entity_type": "agp:launch_target"
				},
				"minecraft:spawn_entity": {
					"entities": [
						{
							"min_wait_time": 1,
							"max_wait_time": 1,
							"single_use": true,
							"spawn_entity": "agp:pl"
						}
					]
				},
				"minecraft:timer": {
					"looping": false,
					"time": [
						3,
						3
					],
					"time_down_event": {
						"event": "Despawn"
					}
				}
			},
			"Despawn": {
				"minecraft:instant_despawn": {}
			}
		},
		"components": {
			"minecraft:movement.basic": {},
			"minecraft:damage_sensor": {
				"triggers": [
					{
						"cause": "fall",
						"deals_damage": false
					}
				]
			},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": false,
				"is_pushable_by_piston": true
			}
		},
		"events": {
			"DragWeak": {
				"add": {
					"component_groups": [
						"TimeDespawn",
						"SetupDragWeak",
						"SetUpMovementDrag"
					]
				},
				"remove": {
					"component_groups": [
						"SetupDragStrong",
						"SetupLift",
						"TimeLaunchWeak",
						"TimeLaunchStrong",
						"SetUpMovementLift"
					]
				},
				"run_command": {
					"command": [
						"tag @s add Drag",
						"tag @s remove Lift1",
						"tag @s remove Lift2"
					]
				}
			},
			"DragStrong": {
				"add": {
					"component_groups": [
						"TimeDespawn",
						"SetupDragStrong",
						"SetUpMovementDrag"
					]
				},
				"remove": {
					"component_groups": [
						"SetupDragWeak",
						"SetupLift",
						"TimeLaunchWeak",
						"TimeLaunchStrong",
						"SetUpMovementLift"
					]
				},
				"run_command": {
					"command": [
						"tag @s add Drag",
						"tag @s remove Lift1",
						"tag @s remove Lift2"
					]
				}
			},
			"LiftWeak": {
				"add": {
					"component_groups": [
						"SetupLift",
						"TimeLaunchWeak",
						"SetUpMovementLift"
					]
				},
				"remove": {
					"component_groups": [
						"TimeLaunchStrong",
						"TimeDespawn",
						"SetupDragWeak",
						"SetupDragStrong",
						"SetUpMovementDrag"
					]
				},
				"run_command": {
					"command": [
						"tag @s add Lift1",
						"tag @s remove Lift2",
						"tag @s remove Drag"
					]
				}
			},
			"LiftStrong": {
				"add": {
					"component_groups": [
						"SetupLift",
						"TimeLaunchStrong",
						"SetUpMovementLift"
					]
				},
				"remove": {
					"component_groups": [
						"TimeLaunchWeak",
						"TimeDespawn",
						"SetupDragWeak",
						"SetupDragStrong",
						"SetUpMovementDrag"
					]
				},
				"run_command": {
					"command": [
						"tag @s add Lift2",
						"tag @s remove Lift1",
						"tag @s remove Drag"
					]
				}
			},
			"Despawn": {
				"run_command": {
					"command": [
						"execute as @s at @s run tag @a[tag=OG,tag=!ALD,tag=!Ble,tag=!RL] remove OG"
					]
				},
				"add": {
					"component_groups": [
						"Despawn"
					]
				}
			},
			"LD_LiftWeak": {
				"run_command": {
					"command": [
						"execute as @s at @s run tag @s add PP",
						"execute as @s at @s run tp ~~~ facing ~~0.53~1",
						"execute as @s at @s run event entity @s Launch"
					]
				}
			},
			"LD_LiftStrong": {
				"run_command": {
					"command": [
						"execute as @s at @s run tag @s add PP",
						"execute as @s at @s run tp ~~~ facing ~~0.57~1",
						"execute as @s at @s run event entity @s Launch2"
					]
				}
			},
			"CG": {
				"run_command": {
					"command": [
						"tag @s add CG"
					]
				}
			},
			"NoCG": {
				"run_command": {
					"command": [
						"tag @s remove CG"
					]
				}
			},
			"CountdownWeak": {
				"run_command": {
					"command": [
						"tag @s add Check1"
					]
				},
				"add": {
					"component_groups": [
						"CountdownTimerWeak"
					]
				},
				"remove": {
					"component_groups": [
						"TimeDespawn"
					]
				}
			},
			"CountdownStrong": {
				"run_command": {
					"command": [
						"tag @s add Check1"
					]
				},
				"add": {
					"component_groups": [
						"CountdownTimerStrong"
					]
				},
				"remove": {
					"component_groups": [
						"TimeDespawn"
					]
				}
			},
			"RW_Drag": {
				"add": {
					"component_groups": [
						"GetFam_Drag"
					]
				}
			},
			"Become_PAW": {
				"add": {
					"component_groups": [
						"TransformPAW"
					]
				}
			},
			"Become_PAS": {
				"add": {
					"component_groups": [
						"TransformPAS"
					]
				}
			},
			"Launch": {
				"run_command": {
					"command": [
						"execute as @s at @s run execute as @p[r=12,tag=RL,tag=!ALD,tag=!IS,tag=!BO,c=1] positioned as @s run tag @s add ALD",
						"execute as @s at @s run execute as @p[r=12,tag=RL,tag=OG,tag=!IS,tag=!BO,c=1] positioned as @s run tag @s remove OG"
					]
				},
				"add": {
					"component_groups": [
						"Launch"
					]
				}
			},
			"Launch2": {
				"run_command": {
					"command": [
						"execute @s at @s run execute @p[r=38,tag=RL,tag=!ALD,tag=!IS,tag=!BO,c=1] positioned as @s run tag @s add ALD",
						"execute @s at @s run execute @p[r=38,tag=RL,tag=OG,tag=!IS,tag=!BO,c=1] positioned as @s run tag @s remove OG"
					]
				},
				"add": {
					"component_groups": [
						"Launch2"
					]
				}
			}
		}
	}
}