{
  "format_version": "1.18.10",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:chest_boat",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false
    },

    "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": {
        "minecraft:rideable": {
          "seat_count": 1,
          "interact_text": "action.interact.ride.boat",
          "pull_in_entities": true,

          "seats": [
            {
              "position": [ 0.2, -0.2, 0.0 ],
              "min_rider_count": 0,
              "max_rider_count": 1,
              
              "rotate_rider_by": "query.has_any_family('blaze', 'creeper', 'enderman', 'illager', 'magmacube', 'piglin', 'player', 'skeleton', 'slime', 'villager', 'wandering_trader', 'witch', 'zombie', 'zombie_pigman') ? -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": {
        }
      }
    },

    "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",
              "operator": "==",
              "value": true
            },
            "cause": "lava",
            "damage_per_tick": 4
          }
        ]
      },
      "minecraft:leashable": {
        "soft_distance": 4.0,
        "hard_distance": 6.0,
        "max_distance": 10.0
      },
      "minecraft:balloonable": {
      },
      "minecraft:inventory": {
        "container_type": "chest_boat",
        "inventory_size": 27,
        "can_be_siphoned_from": true
      },
      "minecraft:rideable": {
        "seat_count": 1,
        "interact_text": "action.interact.ride.boat",
        "pull_in_entities": true,

        "seats": [
          {
            "position": [ 0.2, -0.2, 0.0 ],
            "min_rider_count": 0,
            "max_rider_count": 1,
            
            "rotate_rider_by": "query.has_any_family('blaze', 'creeper', 'enderman', 'illager', 'magmacube', 'piglin', 'player', 'skeleton', 'slime', 'villager', 'wandering_trader', 'witch', 'zombie', 'zombie_pigman') ? -90 : 0",
            "lock_rider_rotation": 90
          }
        ]
      },
      "minecraft:is_stackable": {
      },
      "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",
                "operator": "==",
                "value": true
              }
            ]
          }
        ]
      },
      "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"
            }
          }
        ]
      }
    },

    "events": {
      "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",
            "minecraft:can_ride"
          ]
        }
      },
      "minecraft:sink": {
        "remove": {
          "component_groups": [
            "minecraft:floating",
            "minecraft:can_ride",
            "minecraft:above_bubble_column_down",
            "minecraft:above_bubble_column_up"
          ]
        }
      }
    }
  }
}
