{
  "format_version": "1.21.90",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:boat",
      "is_spawnable": false,
      "is_summonable": true
    },

    "components": {
      "minecraft:type_family": {
        "family": [ "boat", "inanimate" ]
      },
      "minecraft:collision_box": {
        "width": 1.4,
        "height": 0.455
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": {
              "test": "in_lava", "subject": "self"
            },
            "cause": "lava",
            "damage_per_tick": 4
          }
        ]
      },
      "minecraft:loot": {
        "table": "loot_tables/entities/boat.json"
      },
      "minecraft:leashable": {
        "presets": [
          {
            "filter": { "test": "is_family", "subject": "other", "value": "happy_ghast" },
            "spring_type": "quad_dampened",
            "rotation_adjustment": 90
          },
          {
            "rotation_adjustment": 90,
            "soft_distance": 2.0,
            "hard_distance": 4.0
          }
        ]
      },
      "minecraft:leashable_to": {
      },
      "minecraft:balloonable": {
      },
      "minecraft:is_stackable": {
      },
      "minecraft:is_collidable": {
      },
      "minecraft:physics": {
      },
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:buoyant": {
        "base_buoyancy": 1.0,
        "apply_gravity": true,
        "simulate_waves": true,
        "big_wave_probability": 0.03,
        "big_wave_speed": 10.0,
        "liquid_blocks": [
          "minecraft:water",
          "minecraft:flowing_water"
        ]
      },
      "minecraft:conditional_bandwidth_optimization": {
        "default_values": {
          "max_optimized_distance": 60.0,
          "max_dropped_ticks": 20,
          "use_motion_prediction_hints": true
        },
        "conditional_values": [
          {
            "max_optimized_distance": 0.0,
            "max_dropped_ticks": 0,
            "use_motion_prediction_hints": true,
            "conditional_values": [
              { "test": "is_moving", "subject": "self" }
            ]
          }
        ]
      },
      "minecraft:inside_block_notifier": {
        "block_list": [
          {
            "block": {
              "name": "minecraft:bubble_column",
              "states": {
                "drag_down": true
              }
            },
            "entered_block_event": {
              "event": "minecraft:entered_bubble_column_down",
              "target": "self"
            },
            "exited_block_event": {
              "event": "minecraft:exited_bubble_column",
              "target": "self"
            }
          },
          {
            "block": {
              "name": "minecraft:bubble_column",
              "states": {
                "drag_down": false
              }
            },
            "entered_block_event": {
              "event": "minecraft:entered_bubble_column_up",
              "target": "self"
            },
            "exited_block_event": {
              "event": "minecraft:exited_bubble_column",
              "target": "self"
            }
          }
        ]
      },
      "minecraft:rideable": {
        "seat_count": 2,
        "passenger_max_width": 1.375,
        "interact_text": "action.interact.ride.boat",
        "pull_in_entities": true,
        "seats": [
          {
            "position": [ 0.0, -0.2, 0.0 ],
            "min_rider_count": 0,
            "max_rider_count": 1,
            "rotate_rider_by": -90,
            "lock_rider_rotation": 90
          },
          {
            "position": [ 0.2, -0.2, 0.0 ],
            "min_rider_count": 2,
            "max_rider_count": 2,
            "rotate_rider_by": "query.has_any_family('blaze', 'creeper', 'enderman', 'illager', 'magmacube', 'piglin', 'player', 'skeleton', 'slime', 'villager', 'wandering_trader', 'witch', 'zombie', 'zombie_pigman', 'happy_ghast') ? -90 : 0",
            "lock_rider_rotation": 90
          },
          {
            "position": [ -0.6, -0.2, 0.0 ],
            "min_rider_count": 2,
            "max_rider_count": 2,
            "rotate_rider_by": "query.has_any_family('blaze', 'creeper', 'enderman', 'illager', 'magmacube', 'piglin', 'player', 'skeleton', 'slime', 'villager', 'wandering_trader', 'witch', 'zombie', 'zombie_pigman', 'happy_ghast') ? -90 : 0",
            "lock_rider_rotation": 90
          }
        ]
      }
    },

    "component_groups": {
      "minecraft:floating": {
        "minecraft:buoyant": {
          "base_buoyancy": 1.0,
          "apply_gravity": true,
          "simulate_waves": true,
          "big_wave_probability": 0.03,
          "big_wave_speed": 10.0,
          "liquid_blocks": [
            "minecraft:water",
            "minecraft:flowing_water"
          ]
        }
      },
      "minecraft:can_ride_default": {
        "minecraft:rideable": {
          "seat_count": 2,
          "passenger_max_width": 1.375,
          "interact_text": "action.interact.ride.boat",
          "pull_in_entities": true,
          "seats": [
            {
              "position": [ 0.0, -0.2, 0.0 ],
              "min_rider_count": 0,
              "max_rider_count": 1,
              "rotate_rider_by": -90,
              "lock_rider_rotation": 90
            },
            {
              "position": [ 0.2, -0.2, 0.0 ],
              "min_rider_count": 2,
              "max_rider_count": 2,
              "rotate_rider_by": "query.has_any_family('blaze', 'creeper', 'enderman', 'illager', 'magmacube', 'piglin', 'player', 'skeleton', 'slime', 'villager', 'wandering_trader', 'witch', 'zombie', 'zombie_pigman', 'happy_ghast') ? -90 : 0",
              "lock_rider_rotation": 90
            },
            {
              "position": [ -0.6, -0.2, 0.0 ],
              "min_rider_count": 2,
              "max_rider_count": 2,
              "rotate_rider_by": "query.has_any_family('blaze', 'creeper', 'enderman', 'illager', 'magmacube', 'piglin', 'player', 'skeleton', 'slime', 'villager', 'wandering_trader', 'witch', 'zombie', 'zombie_pigman', 'happy_ghast') ? -90 : 0",
              "lock_rider_rotation": 90
            }
          ]
        }
      },
      "minecraft:can_ride_bamboo": {
        "minecraft:rideable": {
          "seat_count": 2,
          "passenger_max_width": 1.375,
          "interact_text": "action.interact.ride.boat",
          "pull_in_entities": true,
          "seats": [
            {
              "position": [ 0.0, 0.1, 0.0 ],
              "min_rider_count": 0,
              "max_rider_count": 1,
              "rotate_rider_by": -90,
              "lock_rider_rotation": 90
            },
            {
              "position": [ 0.2, 0.1, 0.0 ],
              "min_rider_count": 2,
              "max_rider_count": 2,
              "rotate_rider_by": "query.has_any_family('blaze', 'creeper', 'enderman', 'illager', 'magmacube', 'piglin', 'player', 'skeleton', 'slime', 'villager', 'wandering_trader', 'witch', 'zombie', 'zombie_pigman', 'happy_ghast') ? -90 : 0",
              "lock_rider_rotation": 90
            },
            {
              "position": [ -0.6, 0.1, 0.0 ],
              "min_rider_count": 2,
              "max_rider_count": 2,
              "rotate_rider_by": "query.has_any_family('blaze', 'creeper', 'enderman', 'illager', 'magmacube', 'piglin', 'player', 'skeleton', 'slime', 'villager', 'wandering_trader', 'witch', 'zombie', 'zombie_pigman', 'happy_ghast') ? -90 : 0",
              "lock_rider_rotation": 90
            }
          ]
        }
      },
      "minecraft:above_bubble_column_down": {
        "minecraft:buoyant": {
          "base_buoyancy": 1.0,
          "apply_gravity": true,
          "simulate_waves": false,
          "liquid_blocks": [
            "minecraft:water",
            "minecraft:flowing_water"
          ],
          "drag_down_on_buoyancy_removed": 0.7
        },
        "minecraft:timer": {
          "looping": false,
          "time": 3,
          "time_down_event": {
            "event": "minecraft:sink",
            "target": "self"
          }
        },
        "minecraft:out_of_control": {
        }
      },
      "minecraft:above_bubble_column_up": {
        "minecraft:buoyant": {
          "base_buoyancy": 1.0,
          "apply_gravity": true,
          "simulate_waves": false,
          "liquid_blocks": [
            "minecraft:water",
            "minecraft:flowing_water"
          ],
          "drag_down_on_buoyancy_removed": 0.7
        },
        "minecraft:out_of_control": {
        }
      }
    },

    "events": {
      "minecraft:entity_spawned": {
        "trigger": "minecraft:add_can_ride"
      },
      "minecraft:add_can_ride": {
        "sequence": [
          {
            "filters": {
              "test": "is_variant", "operator": "!=", "value": 7
            },
            "add": {
              "component_groups": [
                "minecraft:can_ride_default"
              ]
            }
          },
          {
            "filters": {
              "test": "is_variant", "operator": "==", "value": 7
            },
            "add": {
              "component_groups": [
                "minecraft:can_ride_bamboo"
              ]
            }
          }
        ]
      },
      "minecraft:entered_bubble_column_down": {
        "remove": {
          "component_groups": [
            "minecraft:floating"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:above_bubble_column_down"
          ]
        }
      },
      "minecraft:entered_bubble_column_up": {
        "remove": {
          "component_groups": [
            "minecraft:floating"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:above_bubble_column_up"
          ]
        }
      },
      "minecraft:exited_bubble_column": {
        "remove": {
          "component_groups": [
            "minecraft:above_bubble_column_down",
            "minecraft:above_bubble_column_up"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:floating"
          ]
        },
        "trigger": "minecraft:add_can_ride"
      },
      "minecraft:sink": {
        "remove": {
          "component_groups": [
            "minecraft:floating",
            "minecraft:can_ride_default",
            "minecraft:can_ride_bamboo",
            "minecraft:above_bubble_column_down",
            "minecraft:above_bubble_column_up"
          ]
        }
      }
    }
  }
}
