{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "lifeboat:jet_ski_2",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "lifeboat:exploding": {
        "minecraft:explode": {
          "fuseLength": -0.5,
          "fuseLit": true,
          "power": 0, 
          "causesFire": false,
          "destroyAffectedByGriefing": true
        }
      },

      "text0":{
        "minecraft:variant": {
          "value": 0
        }
      },
      "text1":{
        "minecraft:variant": {
          "value": 1
        }
      },
      "text2":{
        "minecraft:variant": {
          "value": 2
        }
      },
	    "text3":{
        "minecraft:variant": {
          "value": 3
        }
      },
      "text4":{
        "minecraft:variant": {
          "value": 4
        }
      }
	  },
    "components": {
      "minecraft:navigation.generic": {
        "can_path_over_water" : true,
        "can_sink": false
      },
      "minecraft:type_family": {
        "family": [ "jet_ski_2" ]
      },
	     "minecraft:collision_box": {
        "height": 3.0 ,
        "width": 1.5
      },
      "minecraft:interact": {
				"interactions": [
					{
            "cooldown": 0.0,
            "use_item": false,
            "hurt_item": 0,
            "play_sounds": "drop.slot",
            "interact_text": "Shrink",
     	      "spawn_items": { "table": "loot_tables/jet_ski_2.json" },
						"on_interact": {
							"filters": {
								"all_of": [
									{ "test": "is_family", "subject": "other", "value": "player" },
									{ "test": "is_sneaking", 	"subject": "other" }
								]
							},
							"event": "lifeboat:death",
							"target": "self"
						},
						"swing": true
					}
				]
			},
      "minecraft:damage_sensor": {
        "triggers":  [
            {
            "on_damage": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" }
                ]
              },
              "event": "minecraft:color_change",
              "target": "self"
            },
            "deals_damage": false
          },
          {
            "deals_damage": false
          }
        ]
      },
      "minecraft:jump.static": {
      },
      "minecraft:behavior.float": {
      },
      "minecraft:movement": {
        "value": 0.05
      },
      "minecraft:pushable": {
        "is_pushable": false
      },
        "minecraft:underwater_movement": {
          "value": 0.2
        },
      "minecraft:input_ground_controlled": {},
      "minecraft:scale": {
        "value": 1.0
      },
      "minecraft:rideable": {
        "seat_count": 1,
        "family_types":["player"],
        "crouching_skip_interact": true,
        "interact_text": "On Board",
        "seats": [
          {
            "position": [ 0.0, 1.2, -0.4 ]
          }
        ]
      },
      "minecraft:physics": {}
    },
    "events": {
      "lifeboat:death":{
        "add": {
          "component_groups": [
            "lifeboat:exploding"
          ]
        }
      },

      "minecraft:color_change": {
        "sequence": [
          {
            "filters": {
              "test": "is_variant", 
              "value": 0
            },
            "remove": {
              "component_groups": [
                "text0"
              ]
            },
            "add": {
              "component_groups": [
                "text1"
              ]
            }
          },
          {
            "filters": {
              "test": "is_variant", 
              "value": 1
            },
            "remove": {
              "component_groups": [
                "text1"
              ]
            },
            "add": {
              "component_groups": [
                "text2"
              ]
            }
          },
          {
            "filters": {
              "test": "is_variant", 
              "value": 2
            },
            "remove": {
              "component_groups": [
                "text2"
              ]
            },
            "add": {
              "component_groups": [
                "text3"
              ]
            }
          },
          {
            "filters": {
              "test": "is_variant", 
              "value": 3
            },
            "remove": {
              "component_groups": [
                "text3"
              ]
            },
            "add": {
              "component_groups": [
                "text4"
              ]
            }
          },
          {
            "filters": {
              "test": "is_variant", 
              "value": 4
            },
            "remove": {
              "component_groups": [
                "text4"
              ]
            },
            "add": {
              "component_groups": [
                "text0"
              ]
            }
          }
        ]
      }
    }
  }
}