{
  "format_version": "1.18.0",
  "minecraft:entity": {
    "description": {
      "identifier": "mdrb:scooter_suitcase_mdrb",
      "spawn_category": "creature",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "ride": {
        "minecraft:rideable": {
          "seat_count": 2,
          "interact_text": "Ride",
          "on_rider_enter_event": "add_control",
          "on_rider_exit_event": "remove_control",
          "family_types": [
            "player", "suitcase_container"
          ],
          "seats": [
            {
              "position": [ 0, 0, -0.3 ],
              "min_rider_count": 0,
              "max_rider_count": 1
            },
            {
              "position": [ 0, 0.75, 0.25 ],
              "min_rider_count": 2,
              "max_rider_count": 2
            },
            {
              "position": [ 0, 0, -0.3 ],
              "min_rider_count": 2,
              "max_rider_count": 2
            }
          ]
        },
        "minecraft:addrider": {
          "entity_type": "mdrb:suitcase_container_mdrb"
        }
      },
      "follow": {
        "minecraft:behavior.follow_owner": {
          "priority": 0,
          "speed_multiplier": 2,
          "start_distance": 4,
          "stop_distance": 3,
          "can_teleport": false
        },
        "minecraft:follow_range": {
          "value": 64
        }
      },
      "control": {
        "minecraft:behavior.player_ride_tamed": {
          "fractional_rotation": 1
        },
        "minecraft:input_ground_controlled": {
        }
      },
      "solid": {
        "minecraft:is_collidable": {
        }
      },
      "walk_mode": {
        "minecraft:navigation.walk": {
          "can_path_over_water": true
        },
        "minecraft:jump.static": {
        }
      },
      "climb_mode": {
        "minecraft:navigation.climb": {
          "can_path_over_water": true
        }
      }
    },
    "components": {
      "minecraft:damage_sensor": {
        "triggers": {
          "cause": "all",
          "deals_damage": false
        }
      },
      "minecraft:type_family": {
        "family": [ "scooter_suitcase", "md" ]
      },
      "minecraft:collision_box": {
        "width": 0.5,
        "height": 1
      },
      "minecraft:nameable": {
        "always_show": false,
        "allow_name_tag_renaming": false
      },
      "minecraft:movement": {
        "value": 0.15
      },
      "minecraft:movement.basic": {
      },
      "minecraft:tameable": {
      },
      "minecraft:is_tamed": {
      },
      "minecraft:physics": {
      },
      "minecraft:pushable": {
        "is_pushable": false,
        "is_pushable_by_piston": false
      },
      "minecraft:environment_sensor": {
        "triggers": [
          {
            "filters": {
              "all_of": [
                {"test":"has_component", "value":"minecraft:navigation.walk"},
                {"test": "in_block", "value": "md:stairs_hitbox"}
              ]
            },
            "event": "climb_mode"
          },
          {
            "filters": {
              "all_of": [
                {"test":"has_component", "value":"minecraft:navigation.climb"},
                {"test": "in_block", "operator":"!=", "value": "md:stairs_hitbox"}
              ]
            },
            "event": "walk_mode"
          }
        ]
      },
      "minecraft:interact": {
        "interactions": [
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "is_owner",
                    "subject": "other",
                    "value": true
                  },
                  {
                    "test": "is_sneaking",
                    "subject": "other",
                    "value": true
                  },
                  {
                    "test": "has_component",
                    "operator": "!=",
                    "value": "minecraft:follow_range"
                  }
                ]
              },
              "event": "follow"
            },
            "interact_text": "Follow"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "is_owner",
                    "subject": "other",
                    "value": true
                  },
                  {
                    "test": "is_sneaking",
                    "subject": "other",
                    "value": true
                  },
                  {
                    "test": "has_component",
                    "value": "minecraft:follow_range"
                  }
                ]
              },
              "event": "stay"
            },
            "interact_text": "Stay"
          }
        ]
      },
      "minecraft:knockback_resistance": {"value": 9},
      "minecraft:conditional_bandwidth_optimization": {
      }
    },
    "events": {
      "minecraft:entity_spawned": {
        "add" : { "component_groups": ["ride", "solid"] }
      },
      "follow": {
        "remove" : { "component_groups": ["control", "solid"] },
        "add" : { "component_groups": ["follow","walk_mode"] }
      },
      "stay": {
        "remove" : { "component_groups": ["follow","walk_mode","climb_mode"] },
        "add" : { "component_groups": ["solid"] }
      },
      "add_control": {
        "sequence": [
          {
            "filters": { "test": "has_component", "operator": "!=", "value": "minecraft:follow_range" },
            "remove" : { "component_groups": ["solid"] },
            "add" : { "component_groups": ["control"] }
          }
        ]
      },
      "remove_control": {
        "sequence": [
          {
            "remove" : { "component_groups": ["control"] }
          },
          {
            "filters": { "test": "has_component", "operator": "!=", "value": "minecraft:follow_range" },
            "add" : { "component_groups": ["solid"] }
          }
        ]
      },
      "walk_mode": {
        "remove" : { "component_groups": ["climb_mode"] },
        "add" : { "component_groups": ["walk_mode"] }
      },
      "climb_mode": {
        "remove" : { "component_groups": ["walk_mode"] },
        "add" : { "component_groups": ["climb_mode"] }
      }
    }
  }
}