{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "pr:ptera",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "minecraft:baby": {
        "minecraft:type_family": {
          "family": [
            "pterano"
          ]
        },
        "minecraft:collision_box": {
          "width": 0.6,
          "height": 0.2
        },
        "minecraft:underwater_movement": {
          "value": 0.3
        },
        "minecraft:is_baby": {},
        "minecraft:scale_by_age": {
          "start_scale": 0.2,
          "end_scale": 0.84
        },
        "minecraft:behavior.move_to_water": {
          "priority": 1,
          "search_range": 15,
          "search_height": 5,
          "goal_radius": 0.1
        },
        "minecraft:ageable": {
          "duration": 1200,
          "feedItems": [
            "pr:growth_syringe"
          ],
          "drop_items": [
            "air"
          ],
          "grow_up": {
            "event": "minecraft:ageable_grow_up",
            "target": "self"
          }
        },
        "minecraft:behavior.random_stroll": {
          "priority": 4,
          "interval": 6
        }
      },
      "minecraft:adult": {
        "minecraft:type_family": {
          "family": [
            "turtle"
          ]
        },
        "minecraft:collision_box": {
          "width": 1.2,
          "height": 0.4
        },
        "minecraft:underwater_movement": {
          "value": 0.3
        },
        "minecraft:breedable": {
          "requireTame": false,
          "breedsWith": [
            {
              "mateType": "pr:pteraf",
              "babyType": "pr:egg_ptera",
              "breed_event": {
                "event": "minecraft:entity_born",
                "target": "baby"
              }
            }
          ],
          "breedItems": [
            "fish",
            "pr:aquaticmeat",
            "salmon",
            "fish",
            "salmon",
            "fish",
            "pr:aquaticmeat",
            "salmon",
            "fish",
            "salmon"
          ]
        },
        "minecraft:behavior.breed": {
          "priority": 2,
          "speed_multiplier": 1
        },
        "minecraft:behavior.move_to_land": {
          "priority": 3,
          "search_range": 56,
          "search_height": 15,
          "goal_radius": 0.5
        },
        "minecraft:behavior.random_stroll": {
          "priority": 3,
          "interval": 6
        }
      },
      "minecraft:pregnant": {
        "minecraft:behavior.go_home": {
          "priority": 1,
          "speed_multiplier": 1,
          "interval": 700,
          "goal_radius": 4,
          "on_home": {
            "event": "minecraft:go_lay_egg",
            "target": "self"
          }
        }
      },
      "minecraft:wants_to_lay_egg": {
        "minecraft:behavior.lay_egg": {
          "priority": 1,
          "speed_multiplier": 1,
          "search_range": 16,
          "search_height": 4,
          "goal_radius": 1,
          "on_lay": {
            "event": "minecraft:laid_egg",
            "target": "self"
          }
        }
      },
      "land": {
        "minecraft:timer": {
          "looping": true,
          "time": 35,
          "time_down_event": {
            "event": "randomize_movement"
          }
        },
        "minecraft:movement.basic": {},
        "minecraft:movement": {
          "value": 0.23,
          "max": 0.23
        },
        "minecraft:navigation.generic": {
          "is_amphibious": true,
          "can_path_over_water": true,
          "can_swim": true,
          "can_walk": true,
          "can_sink": false,
          "avoid_damage_blocks": true
        },
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "slow_falling",
              "duration": 9999999,
              "visible": false
            }
          ]
        }
      },
      "fly": {
        "minecraft:flying_speed": {
          "value": 0.02
        },
        "minecraft:timer": {
          "looping": true,
          "time": [
            15,
            30
          ],
          "time_down_event": {
            "event": "randomize_movement"
          }
        },
        "minecraft:movement.glide": {
          "start_speed": 0.9,
          "speed_when_turning": 0.9
        },
        "minecraft:movement": {
          "value": 0.23,
          "max": 0.23
        },
        "minecraft:behavior.circle_around_anchor": {
          "priority": 3,
          "radius_change": 1,
          "goal_radius": 5,
          "height_offset_range": [
            6,
            20
          ],
          "height_above_target_range": [
            3,
            3
          ],
          "angle_change": 30,
          "radius_range": [
            18,
            19
          ],
          "radius_adjustment_chance": 0.004,
          "height_adjustment_chance": 0.002857
        }
      }
    },
    "components": {
      "minecraft:nameable": {
        "alwaysShow": false,
        "allowNameTagRenaming": true
      },
      "minecraft:health": {
        "value": 20,
        "max": 20
      },
      "minecraft:water_movement": {
        "drag_factor": 0
      },
      "minecraft:movement.amphibious": {
        "max_turn": 5
      },
      "minecraft:jump.static": {},
      "minecraft:physics": {},
      "minecraft:home": {},
      "minecraft:follow_range": {
        "value": 1024
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 3
      },
      "minecraft:behavior.tempt": {
        "priority": 3,
        "speed_multiplier": 1.1,
        "items": [
          "beef",
          "chicken",
          "cooked_beef",
          "cooked_chicken",
          "cooked_fish",
          "cooked_rabbit",
          "cooked_salmon",
          "fish",
          "muttonraw"
        ]
      },
      "minecraft:behavior.move_to_water": {
        "priority": 4,
        "search_range": 16,
        "search_height": 5,
        "search_count": 1,
        "goal_radius": 0.1
      },
      "minecraft:behavior.random_swim": {
        "priority": 7,
        "interval": 0,
        "xz_dist": 30,
        "y_dist": 15
      },
      "minecraft:behavior.look_at_player": {
        "priority": 8,
        "target_distance": 6,
        "probability": 0.02
      },
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? 56 : 0"
      },
      "minecraft:underwater_movement": {
        "value": 0.3
      },
      "minecraft:type_family": {
        "family": [
          "pterano"
        ]
      },
      "minecraft:scale": {
        "value": 0.84
      },
      "minecraft:sittable": {},
      "minecraft:behavior.stay_while_sitting": {
        "priority": 3
      },
      "minecraft:attack": {
        "damage": 6
      },
      "minecraft:behavior.melee_attack": {
        "priority": 2,
        "speed_multiplier": 1,
        "target_dist": 0,
        "max_dist": 3,
        "random_stop_interval": 100,
        "track_target": false,
        "reach_multiplier": 1.4
      },
      "minecraft:collision_box": {
        "height": 1.5,
        "width": 1.0
      },
      "minecraft:behavior.breed": {
        "priority": 3,
        "speed_multiplier": 1
      },
      "minecraft:tameable": {
        "probability": 0.33,
        "tameItems": [
          "pr:aquaticmeat",
          "fish",
          "salmon",
          "pr:aquaticmeat",
          "fish",
          "salmon"
        ],
        "tame_event": {
          "event": "minecraft:on_tame",
          "target": "self"
        }
      },
      "minecraft:behavior.nearest_attackable_target": {
        "priority": 3,
        "within_radius": 25,
        "must_reach": true,
        "entity_types": [
          {
            "filters": {
              "any_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "cod"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "fish"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "salmon"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "silverfish"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "squid"
                }
              ]
            },
            "max_dist": 35.0,
            "must_see": false
          }
        ],
        "must_see": false
      },
      "minecraft:behavior.owner_hurt_by_target": {
        "priority": 1
      },
      "minecraft:behavior.owner_hurt_target": {
        "priority": 2
      },
      "minecraft:can_climb": {},
      "minecraft:behavior.move_to_land": {
        "priority": 0,
        "search_height": 48,
        "search_range": 9,
        "search_count": 0,
        "goal_radius": 1,
        "speed_multiplier": 1
      },
      "minecraft:behavior.swoop_attack": {
        "priority": 2,
        "damage_reach": 1,
        "speed_multiplier": 1.5,
        "delay_range": [
          10,
          20
        ]
      },
      "minecraft:movement": {
        "value": 0.23,
        "max": 0.23
      },
      "minecraft:timer": {
        "looping": true,
        "time": 10,
        "time_down_event": {
          "event": "on:tick_action"
        }
      },
      "minecraft:loot": {
        "table": "loot_tables/entities/pr_ptera.json"
      }
    },
    "events": {
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 9,
            "add": {
              "component_groups": [
                "minecraft:adult",
                "land"
              ]
            }
          },
          {
            "weight": 1,
            "add": {
              "component_groups": [
                "minecraft:baby",
                "land"
              ]
            }
          }
        ]
      },
      "minecraft:entity_born": {
        "add": {
          "component_groups": [
            "minecraft:baby",
            "land"
          ]
        }
      },
      "minecraft:ageable_grow_up": {
        "remove": {
          "component_groups": [
            "minecraft:baby"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:adult"
          ]
        }
      },
      "minecraft:become_pregnant": {
        "add": {
          "component_groups": [
            "minecraft:pregnant"
          ]
        }
      },
      "minecraft:go_lay_egg": {
        "add": {
          "component_groups": [
            "minecraft:wants_to_lay_egg"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:pregnant"
          ]
        }
      },
      "minecraft:laid_egg": {
        "remove": {
          "component_groups": [
            "minecraft:wants_to_lay_egg"
          ]
        }
      },
      "on:death": {
        "run_command": {
          "command": []
        }
      },
      "on:hurt": {
        "run_command": {
          "command": []
        }
      },
      "on:hurt_by_player": {
        "run_command": {
          "command": []
        }
      },
      "on:ignite": {
        "run_command": {
          "command": []
        }
      },
      "on:target_acquired": {
        "run_command": {
          "command": []
        }
      },
      "on:target_escape": {
        "run_command": {
          "command": []
        }
      },
      "on:wake_with_owner": {
        "run_command": {
          "command": []
        }
      },
      "randomize_movement": {
        "randomize": [
          {
            "weight": 56,
            "remove": {
              "component_groups": [
                "fly"
              ]
            },
            "add": {
              "component_groups": [
                "land"
              ]
            }
          },
          {
            "weight": 50,
            "remove": {
              "component_groups": [
                "land"
              ]
            },
            "add": {
              "component_groups": [
                "fly"
              ]
            }
          }
        ]
      },
      "on:tick_action": {
        "randomize": [
          {
            "run_command": {
              "command": [
                "function PteraFly"
              ]
            },
            "weight": 1
          }
        ]
      }
    }
  }
}