{
  "format_version": "1.26.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:camel",
      "is_summonable": true,
      "is_spawnable": true,
      "spawn_category": "creature"
    },
    "components": {
      "minecraft:balloonable": {},
      "minecraft:behavior.float": {
        "chance_per_tick_to_float": 1,
        "priority": 0,
        "time_under_water_to_dismount_passengers": 2
      },
      "minecraft:behavior.look_at_player": {
        "look_time": {
          "min": 1,
          "max": 2
        },
        "priority": 7
      },
      "minecraft:behavior.panic": {
        "priority": 1,
        "speed_multiplier": 4
      },
      "minecraft:behavior.random_look_around": {
        "priority": 8
      },
      "minecraft:behavior.random_look_around_and_sit": {
        "min_look_time": 80,
        "continue_if_leashed": true,
        "min_look_count": 2,
        "max_look_time": 100,
        "continue_sitting_on_reload": true,
        "max_angle_of_view_horizontal": 30,
        "max_look_count": 5,
        "min_angle_of_view_horizontal": -30,
        "priority": 4,
        "probability": 0.001,
        "random_look_around_cooldown": 5
      },
      "minecraft:behavior.random_stroll": {
        "priority": 6,
        "speed_multiplier": 2
      },
      "minecraft:behavior.tempt": {
        "can_tempt_vertically": true,
        "items": [
          "cactus"
        ],
        "priority": 3,
        "speed_multiplier": 2.5
      },
      "minecraft:breathable": {
        "suffocate_time": 0,
        "total_supply": 15
      },
      "minecraft:can_climb": {},
      // This component prevents Camel from spawning in spaces it doesn't fit. Without it, the correct collision box wont be set until the sitting/standing events are triggered.
      "minecraft:collision_box": {
        "height": 2.375,
        "width": 1.7
      },
      "minecraft:conditional_bandwidth_optimization": {},
      "minecraft:damage_sensor": {
        "triggers": {
          "cause": "fall",
          "damage_modifier": -4,
          "deals_damage": "yes"
        }
      },
      "minecraft:despawn": {
        "despawn_from_distance": {}
      },
      "minecraft:healable": {
        "items": [
          {
            "heal_amount": 2,
            "item": "cactus"
          }
        ]
      },
      "minecraft:health": {
        "value": 32
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "cause": "lava",
            "damage_per_tick": 4,
            "filters": {
              "subject": "self",
              "test": "in_lava"
            }
          }
        ]
      },
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:is_tamed": {},
      "minecraft:jump.static": {},
      "minecraft:leashable": {
        "presets": [
          {
            "filter": {
              "subject": "other",
              "test": "is_family",
              "value": "happy_ghast"
            },
            "spring_type": "quad_dampened"
          }
        ]
      },
      "minecraft:movement": {
        "value": 0.09
      },
      "minecraft:movement.basic": {},
      "minecraft:nameable": {},
      "minecraft:navigation.walk": {
        "avoid_damage_blocks": true,
        "can_path_over_water": true,
        "using_door_annotation": true
      },
      "minecraft:physics": {},
      "minecraft:type_family": {
        "family": [
          "camel",
          "mob"
        ]
      },
      "minecraft:variable_max_auto_step": {
        "base_value": 1.5625,
        "controlled_value": 1.5625,
        "jump_prevented_value": 0.5625
      }
    },
    "component_groups": {
      "minecraft:camel_adult": {
        "minecraft:behavior.breed": {
          "priority": 2
        },
        "minecraft:breedable": {
          "breed_items": [
            "cactus"
          ],
          "breeds_with": {
            "minecraft:camel": {
              "event": "minecraft:entity_born",
              "target": "baby"
            }
          },
          "require_tame": false
        },
        "minecraft:equippable": {
          "slots": [
            {
              "accepted_items": [
                "saddle"
              ],
              "item": "saddle",
              "on_equip": {
                "event": "minecraft:camel_saddled"
              },
              "on_unequip": {
                "event": "minecraft:camel_unsaddled"
              },
              "slot": 0
            }
          ]
        },
        "minecraft:experience_reward": {
          "on_bred": {
            "expression": "Math.Random(1,7)",
            "version": 13
          },
          "on_death": {
            "expression": "query.last_hit_by_player ? Math.Random(1,3) : 0",
            "version": 13
          }
        },
        "minecraft:interact": {
          "interactions": [
            {
              "play_sounds": "saddle",
              "equip_item_slot": "0",
              "on_interact": {
                "filters": {
                  "all_of": [
                    {
                      "domain": "inventory",
                      "test": "has_equipment",
                      "operator": "not",
                      "subject": "self",
                      "value": "saddle"
                    },
                    {
                      "domain": "hand",
                      "subject": "other",
                      "test": "has_equipment",
                      "value": "saddle"
                    },
                    {
                      "subject": "other",
                      "test": "is_sneak_held",
                      "value": false
                    }
                  ]
                }
              },
              "interact_text": "action.interact.saddle",
              "swing": false
            },
            // Removing the Saddle while the Camel is standing. Keep consistent with the next interaction.
            {
              "drop_item_slot": "0",
              // Bigger offset when the Camel is standing.
              "drop_item_y_offset": 2,
              "hurt_item": 1,
              "on_interact": {
                "filters": {
                  "all_of": [
                    {
                      "subject": "self",
                      "test": "is_sitting",
                      "value": false
                    },
                    {
                      "test": "rider_count",
                      "operator": "equals",
                      "subject": "self",
                      "value": 0
                    },
                    {
                      "domain": "inventory",
                      "subject": "self",
                      "test": "has_equipment",
                      "value": "saddle"
                    },
                    {
                      "domain": "hand",
                      "subject": "other",
                      "test": "has_equipment",
                      "value": "shears"
                    },
                    {
                      "subject": "other",
                      "test": "is_sneak_held",
                      "value": false
                    }
                  ]
                }
              },
              "interact_text": "action.interact.removesaddle",
              "play_sounds": "unsaddle",
              "vibration": "shear",
              "swing": false
            },
            // Removing the Saddle while the Camel is sitting. Keep consistent with the previous interaction.
            {
              "drop_item_slot": "0",
              // Smaller offset when the Camel is sitting.
              "drop_item_y_offset": 1,
              "hurt_item": 1,
              "on_interact": {
                "filters": {
                  "all_of": [
                    {
                      "subject": "self",
                      "test": "is_sitting"
                    },
                    {
                      "test": "rider_count",
                      "operator": "equals",
                      "subject": "self",
                      "value": 0
                    },
                    {
                      "domain": "inventory",
                      "subject": "self",
                      "test": "has_equipment",
                      "value": "saddle"
                    },
                    {
                      "domain": "hand",
                      "subject": "other",
                      "test": "has_equipment",
                      "value": "shears"
                    },
                    {
                      "subject": "other",
                      "test": "is_sneak_held",
                      "value": false
                    }
                  ]
                }
              },
              "interact_text": "action.interact.removesaddle",
              "play_sounds": "unsaddle",
              "vibration": "shear",
              "swing": false
            }
          ]
        },
        "minecraft:inventory": {
          "container_type": "horse"
        },
        "minecraft:leashable_to": {},
        "minecraft:offspring": {
          "offspring_pairs": {
            "minecraft:camel": "minecraft:camel"
          }
        },
        "minecraft:rideable": {
          "crouching_skip_interact": true,
          "family_types": [
            "player"
          ],
          "interact_text": "action.interact.ride.horse",
          "pull_in_entities": true,
          "seat_count": 2,
          "seats": [
            {
              "position": [
                0,
                1.905,
                0.5
              ],
              "max_rider_count": 2,
              "min_rider_count": 0
            },
            {
              "position": [
                0,
                1.905,
                -0.5
              ],
              "max_rider_count": 2,
              "min_rider_count": 1
            }
          ]
        }
      },
      "minecraft:camel_sitting": {
        "minecraft:collision_box": {
          "height": 0.945,
          "width": 1.7
        },
        "minecraft:pushable": {
          "is_pushable": false,
          "is_pushable_by_piston": true
        }
      },
      "minecraft:camel_baby": {
        "minecraft:ageable": {
          "duration": 1200,
          "grow_up": {
            "event": "minecraft:ageable_grow_up",
            "target": "self"
          },
          "feed_items": "cactus"
        },
        "minecraft:behavior.follow_parent": {
          "priority": 5,
          "speed_multiplier": 2.5
        },
        "minecraft:is_baby": {},
        "minecraft:scale": {
          "value": 0.45
        }
      },
      "minecraft:camel_saddled": {
        "minecraft:behavior.player_ride_tamed": {},
        "minecraft:dash_action": {
          "horizontal_momentum": 20,
          "cooldown_time": 2.75,
          "vertical_momentum": 0.6
        },
        "minecraft:input_ground_controlled": {},
        "minecraft:is_saddled": {}
      },
      "minecraft:camel_standing": {
        "minecraft:collision_box": {
          "height": 2.375,
          "width": 1.7
        },
        "minecraft:pushable": {
          "is_pushable": true,
          "is_pushable_by_piston": true
        }
      }
    },
    "events": {
      "minecraft:camel_unsaddled": {
        "remove": {
          "component_groups": [
            "minecraft:camel_saddled"
          ]
        }
      },
      "minecraft:ageable_grow_up": {
        "add": {
          "component_groups": [
            "minecraft:camel_adult"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:camel_baby"
          ]
        }
      },
      "minecraft:spawn_adult": {
        "add": {
          "component_groups": [
            "minecraft:camel_adult",
            "minecraft:camel_standing"
          ]
        }
      },
      "minecraft:camel_saddled": {
        "add": {
          "component_groups": [
            "minecraft:camel_saddled"
          ]
        }
      },
      "minecraft:stop_sitting": {
        "add": {
          "component_groups": [
            "minecraft:camel_standing"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:camel_sitting"
          ]
        }
      },
      "minecraft:start_sitting": {
        "add": {
          "component_groups": [
            "minecraft:camel_sitting"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:camel_standing"
          ]
        }
      },
      "minecraft:entity_born": {
        "add": {
          "component_groups": [
            "minecraft:camel_baby",
            "minecraft:camel_standing"
          ]
        }
      },
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "trigger": "minecraft:spawn_adult",
            "weight": 95
          },
          {
            "trigger": "minecraft:entity_born",
            "weight": 5
          }
        ]
      }
    }
  }
}