{
  "format_version": "1.13.0",
  "minecraft:entity": {
    "description": {
      "identifier": "vehicle:shelby.mustang.gt.500",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false,
      "scripts": {
        "animate": [
          {
            "speed": true
          },
          {
            "dust_ground": "query.ground_speed >= 8.8 && query.mark_variant == 1"
          },
          {
            "skid_drift": "query.yaw_speed >= 120 || query.yaw_speed <= -120 && query.ground_speed >= 4 && query.mark_variant == 1"
          },
          {
            "camerashake": "query.ground_speed >= 8.8 && query.mark_variant == 1"
          },
          {
            "backfire": "query.mark_variant == 1"
          },
          {
            "description": "query.has_rider"
          },
          {
            "gear_description": "query.has_rider"
          },
          {
            "resistance": true
          },
          {
            "movement_sistem": true
          },
          {
            "destroyed": "q.health < 8"
          },
          {
            "explode": "!q.is_alive || q.health < 2"
          }
        ]
      },
      "animations": {
        "speed": "controller.animation.slow.speed",
        "dust_ground": "controller.animation.car.dust.ground",
        "skid_drift": "controller.animation.car.skid.drift",
        "camerashake": "controller.animation.car.camerashake",
        "backfire": "controller.animation.shelby.backfire",
        "description": "controller.animation.interact.car.description",
        "gear_description": "controller.animation.shelby.car.gear.description",
        "resistance": "controller.animation.car.resistance",
        "movement_sistem": "controller.animation.car.movement",
        "destroyed": "controller.animation.vehicle.destroyed",
        "explode": "controller.animation.vehicle.explode"
      }
    },
    "component_groups": {
      "car:no_move": {
        "minecraft:movement.basic": {}
      },
      "vehicle:explode": {
        "minecraft:transformation": {
          "into": "vehicle:shelby.mustang.gt.500.destroy",
          "delay": 0.1
        }
      },
      "mob:break": {
        "minecraft:despawn": {},
        "minecraft:loot": {
          "loot": "loot_tables/entities/armor_stand.json"
        }
      },
      "engine:on": {
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:input_ground_controlled": {
          "filters": {
            "all_of": [
              {
                "test": "has_component",
                "subject": "self",
                "operator": "not",
                "value": "minecraft:is_saddled"
              }
            ]
          }
        }
      },
      "engine:off": {
        "minecraft:mark_variant": {
          "value": 2
        }
      },
      "gear1": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:movement": {
          "value": 0.1
        }
      },
      "gear2": {
        "minecraft:variant": {
          "value": 2
        },
        "minecraft:movement": {
          "value": 0.2
        }
      },
      "gear3": {
        "minecraft:variant": {
          "value": 3
        },
        "minecraft:movement": {
          "value": 0.3
        }
      },
      "gear4": {
        "minecraft:variant": {
          "value": 4
        },
        "minecraft:movement": {
          "value": 0.4
        }
      },
      "gear5": {
        "minecraft:variant": {
          "value": 5
        },
        "minecraft:movement": {
          "value": 0.5
        }
      },
      "gear6": {
        "minecraft:variant": {
          "value": 6
        },
        "minecraft:movement": {
          "value": 0.6
        }
      }
    },
    "components": {
      "minecraft:interact": {
        "interactions": [
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "is_riding",
                    "subject": "other",
                    "value": true
                  },
                  {
                    "test": "is_variant",
                    "subject": "self",
                    "operator": "equals",
                    "value": 6
                  }
                ]
              },
              "target": "self",
              "event": "gear1"
            },
            "interact_text": "gear6 >> gear1"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "is_riding",
                    "subject": "other",
                    "value": true
                  },
                  {
                    "test": "is_variant",
                    "subject": "self",
                    "operator": "equals",
                    "value": 1
                  }
                ]
              },
              "target": "self",
              "event": "gear2"
            },
            "interact_text": "gear1 >> gear2"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "is_riding",
                    "subject": "other",
                    "value": true
                  },
                  {
                    "test": "is_variant",
                    "subject": "self",
                    "operator": "equals",
                    "value": 2
                  }
                ]
              },
              "target": "self",
              "event": "gear3"
            },
            "interact_text": "gear2 >> gear3"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "is_riding",
                    "subject": "other",
                    "value": true
                  },
                  {
                    "test": "is_variant",
                    "subject": "self",
                    "operator": "equals",
                    "value": 3
                  }
                ]
              },
              "target": "self",
              "event": "gear4"
            },
            "interact_text": "gear3 >> gear4"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "is_riding",
                    "subject": "other",
                    "value": true
                  },
                  {
                    "test": "is_variant",
                    "subject": "self",
                    "operator": "equals",
                    "value": 4
                  }
                ]
              },
              "target": "self",
              "event": "gear5"
            },
            "interact_text": "gear4 >> gear5"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "is_riding",
                    "subject": "other",
                    "value": true
                  },
                  {
                    "test": "is_variant",
                    "subject": "self",
                    "operator": "equals",
                    "value": 5
                  }
                ]
              },
              "target": "self",
              "event": "gear6"
            },
            "interact_text": "gear5 >> gear6"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "is_riding",
                    "subject": "other",
                    "value": false
                  },
                  {
                    "test": "is_sneaking",
                    "subject": "player",
                    "value": true
                  },
                  {
                    "test": "has_equipment",
                    "domain": "hand",
                    "subject": "other",
                    "value": "loled:repair_car"
                  }
                ]
              },
              "target": "self",
              "event": "car:repair"
            },
            "hurt_item": 1,
            "swing": true,
            "interact_text": "repair car"
          }
        ]
      },
      "minecraft:equippable": {
        "slots": [
          {
            "slot": 0,
            "item": "loled:item_key",
            "accepted_items": [
              "loled:item_key"
            ],
            "on_equip": {
              "event": "minecraft:engine_on"
            },
            "on_unequip": {
              "event": "minecraft:engine_off"
            }
          }
        ]
      },
      "minecraft:inventory": {
        "inventory_size": 8,
        "container_type": "horse"
      },
      "minecraft:health": {
        "value": 70,
        "max": 70
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "on_damage": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "has_ability",
                    "subject": "other",
                    "value": "instabuild"
                  },
                  {
                    "test": "is_sneaking",
                    "subject": "player",
                    "value": true
                  },
                  {
                    "test": "is_riding",
                    "subject": "other",
                    "value": false
                  }
                ]
              },
              "event": "mob:break"
            },
            "deals_damage": false
          },
          {
            "on_damage": {
              "filters": {
                "test": "is_block",
                "subject": "block",
                "value": "minecraft:sweet_berry_bush"
              }
            },
            "deals_damage": false
          },
          {
            "on_damage": {
              "filters": {
                "test": "is_block",
                "subject": "block",
                "value": "minecraft:cactus"
              }
            },
            "deals_damage": false
          },
          {
            "on_damage": {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "mob"
              }
            },
            "deals_damage": false
          },
          {
            "on_damage": {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "player"
              }
            },
            "deals_damage": true
          },
          {
            "on_damage": {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "monster"
              }
            },
            "deals_damage": false
          },
          {
            "on_damage": {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "arrow"
              }
            },
            "deals_damage": true
          },
          {
            "cause": "explosion",
            "deals_damage": true
          },
          {
            "cause": "fall",
            "deals_damage": true
          },
          {
            "cause": "breath",
            "deals_damage": false
          },
          {
            "cause": "magic",
            "deals_damage": false
          },
          {
            "cause": "enity_attack",
            "deals_damage": false
          },
          {
            "cause": "lava",
            "deals_damage": true
          },
          {
            "cause": "fire",
            "deals_damage": true
          },
          {
            "cause": "lightning",
            "deals_damage": true
          }
        ]
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": {
              "test": "is_family",
              "subject": "other",
              "value": "player"
            },
            "cause": "enity_attack",
            "damage_per_tick": 1
          },
          {
            "filters": {
              "test": "is_family",
              "subject": "other",
              "value": "arrow"
            },
            "cause": "contact",
            "damage_per_tick": 1
          }
        ]
      },
      "minecraft:knockback_resistance": true,
      "minecraft:type_family": {
        "family": [
          "shelby_gt_500"
        ]
      },
      "minecraft:jump.static": {},
      "minecraft:rideable": {
        "seat_count": 2,
        "crouching_skip_interact": false,
        "rider_can_interact": true,
        "family_types": [
          "player"
        ],
        "interact_text": "action.interact.mount",
        "seats": [
          {
            "position": [
              0.6,
              0.4,
              -0.4
            ]
          },
          {
            "position": [
              -0.6,
              0.4,
              -0.4
            ]
          }
        ]
      },
      "minecraft:collision_box": {
        "width": 2.4,
        "height": 1.9
      },
      "minecraft:tick_world": {
        "radius": 2,
        "distance_to_players": 1000,
        "never_despawn": true
      },
      "minecraft:physics": {},
      "minecraft:is_stackable": {},
      "minecraft:pushable": {
        "is_pushable": false,
        "is_pushable_by_piston": true
      },
      "minecraft:is_chested": {},
      "minecraft:loot": {
        "table": "loot_tables/entities/armor_stand.json"
      }
    },
    "events": {
      "vehicle:explode": {
        "add": {
          "component_groups": [
            "vehicle:explode"
          ]
        }
      },
      "start:camerashake": {
        "randomize": [
          {
            "weight": 0.1
          },
          {
            "weight": 99,
            "run_command": {
              "command": [
                "execute @s ~~~ camerashake add @a[r=2.4,c=2] 0.01 1 rotational",
                "execute @s ~~~ detect ~~-1~ grass 0 camerashake add @a[r=2.4,c=2] 0.025 1 rotational",
                "execute @s ~~~ detect ~~-1~ podzol 0 camerashake add @a[r=2.4,c=2] 0.025 1 rotational",
                "execute @s ~~~ detect ~~-1~ grass_path 0 camerashake add @a[r=2.4,c=2] 0.025 1 rotational",
                "execute @s ~~~ detect ~~-1~ mycelium 0 camerashake add @a[r=2.4,c=2] 0.025 1 rotational",
                "execute @s ~~~ detect ~~-1~ farmland 0 camerashake add @a[r=2.4,c=2] 0.05 1 rotational",
                "execute @s ~~~ detect ~~-1~ farmland 1 camerashake add @a[r=2.4,c=2] 0.05 1 rotational",
                "execute @s ~~~ detect ~~-1~ dirt 0 camerashake add @a[r=2.4,c=2] 0.05 1 rotational",
                "execute @s ~~~ detect ~~-1~ dirt 1 camerashake add @a[r=2.4,c=2] 0.05 1 rotational",
                "execute @s ~~~ detect ~~-1~ sand 0 camerashake add @a[r=2.4,c=2] 0.05 1 rotational",
                "execute @s ~~~ detect ~~-1~ sand 1 camerashake add @a[r=2.4,c=2] 0.05 1 rotational",
                "execute @s ~~~ detect ~~-1~ cobblestone 0 camerashake add @a[r=2.4,c=2] 0.05 1 rotational",
                "execute @s ~~~ detect ~~-1~ mossy_cobblestone 0 camerashake add @a[r=2.4,c=2] 0.05 1 rotational",
                "execute @s ~~~ detect ~~-1~ stonebrick 0 camerashake add @a[r=2.4,c=2] 0.05 1 rotational",
                "execute @s ~~~ detect ~~-1~ brick_block 0 camerashake add @a[r=2.4,c=2] 0.05 1 rotational"
              ]
            }
          }
        ]
      },
      "stop:camerashake": {
        "randomize": [
          {
            "weight": 0.1
          },
          {
            "weight": 99,
            "run_command": {
              "command": [
                "execute @s ~~~ camerashake stop @a[r=2.5]",
                "execute @s ~~~ detect ~~-1~ grass 0 camerashake stop @a[r=2.5]",
                "execute @s ~~~ detect ~~-1~ podzol 0 camerashake stop @a[r=2.5]",
                "execute @s ~~~ detect ~~-1~ grass_path 0 camerashake stop @a[r=2.5]",
                "execute @s ~~~ detect ~~-1~ mycelium 0 camerashake stop @a[r=2.5]",
                "execute @s ~~~ detect ~~-1~ dirt 0 camerashake stop @a[r=2.5]",
                "execute @s ~~~ detect ~~-1~ dirt 1 camerashake stop @a[r=2.5]",
                "execute @s ~~~ detect ~~-1~ sand 0 camerashake stop @a[r=2.5]",
                "execute @s ~~~ detect ~~-1~ sand 1 camerashake stop @a[r=2.5]",
                "execute @s ~~~ detect ~~-1~ cobblestone 0 camerashake stop @a[r=2.5]",
                "execute @s ~~~ detect ~~-1~ mossy_cobblestone 0 camerashake stop @a[r=2.5]",
                "execute @s ~~~ detect ~~-1~ stonebrick 0 camerashake stop @a[r=2.5]",
                "execute @s ~~~ detect ~~-1~ brick_block 0 camerashake stop @a[r=2.5]"
              ]
            }
          }
        ]
      },
      "dust:ground": {
        "randomize": [
          {
            "weight": 0.1
          },
          {
            "weight": 99,
            "run_command": {
              "command": [
                "execute @s ~~~ detect ~~-1~ dirt 0 playanimation @s animation.car.dust.ground",
                "execute @s ~~~ detect ~~-1~ dirt 1 playanimation @s animation.car.dust.ground",
                "execute @s ~~~ detect ~~-1~ farmland 0 playanimation @s animation.car.dust.ground",
                "execute @s ~~~ detect ~~-1~ sand 0 playanimation @s animation.car.sand.dust.ground",
                "execute @s ~~~ detect ~~-1~ sand 1 playanimation @s animation.car.red.sand.dust.ground"
              ]
            }
          }
        ]
      },
      "car:repair": {
        "randomize": [
          {
            "weight": 0.1,
            "run_command": {
              "command": [
                "effect @s instant_health 1 255 true"
              ]
            }
          },
          {
            "weight": 99,
            "run_command": {
              "command": [
                "effect @s instant_health 1 255 true"
              ]
            }
          }
        ]
      },
      "minecraft:entity_spawned": {
        "add": {
          "component_groups": [
            "gear1",
            "car:no_move"
          ]
        },
        "remove": {
          "component_groups": [
            "gear2",
            "gear3",
            "gear4",
            "gear5",
            "gear6"
          ]
        }
      },
      "car:no_move": {
        "add": {
          "component_groups": [
            "car:no_move"
          ]
        }
      },
      "car:move": {
        "remove": {
          "component_groups": [
            "car:no_move"
          ]
        }
      },
      "minecraft:engine_on": {
        "add": {
          "component_groups": [
            "engine:on"
          ]
        },
        "remove": {
          "component_groups": [
            "engine:off"
          ]
        }
      },
      "minecraft:engine_off": {
        "remove": {
          "component_groups": [
            "engine:on"
          ]
        },
        "add": {
          "component_groups": [
            "engine:off"
          ]
        }
      },
      "exhaust:backfire": {
        "randomize": [
          {
            "weight": 60
          },
          {
            "weight": 40,
            "run_command": {
              "command": [
                "playanimation @s animation.car.backfire"
              ]
            }
          }
        ]
      },
      "gear1": {
        "add": {
          "component_groups": [
            "gear1"
          ]
        },
        "remove": {
          "component_groups": [
            "gear2",
            "gear3",
            "gear4",
            "gear5",
            "gear6"
          ]
        }
      },
      "gear2": {
        "add": {
          "component_groups": [
            "gear2"
          ]
        },
        "remove": {
          "component_groups": [
            "gear1",
            "gear3",
            "gear4",
            "gear5",
            "gear6"
          ]
        }
      },
      "gear3": {
        "add": {
          "component_groups": [
            "gear3"
          ]
        },
        "remove": {
          "component_groups": [
            "gear2",
            "gear1",
            "gear4",
            "gear5",
            "gear6"
          ]
        }
      },
      "gear4": {
        "add": {
          "component_groups": [
            "gear4"
          ]
        },
        "remove": {
          "component_groups": [
            "gear2",
            "gear3",
            "gear1",
            "gear5",
            "gear6"
          ]
        }
      },
      "gear5": {
        "add": {
          "component_groups": [
            "gear5"
          ]
        },
        "remove": {
          "component_groups": [
            "gear2",
            "gear3",
            "gear4",
            "gear1",
            "gear6"
          ]
        }
      },
      "gear6": {
        "add": {
          "component_groups": [
            "gear6"
          ]
        },
        "remove": {
          "component_groups": [
            "gear2",
            "gear3",
            "gear4",
            "gear5",
            "gear1"
          ]
        }
      },
      "mob:break": {
        "add": {
          "component_groups": [
            "mob:break"
          ]
        }
      }
    }
  }
}