{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "oct_spcrs:car_7",
      "materials": {
        "default": "entity_alphatest",
        "translucent": "entity_alphablend"
      },
      "textures": {
        "car_color_black": "textures/octovon/spcrs/entity/car_7/car_7_black",
        "car_color_blue": "textures/octovon/spcrs/entity/car_7/car_7_blue",
        "car_color_copper": "textures/octovon/spcrs/entity/car_7/car_7_bronze",
        "car_color_green": "textures/octovon/spcrs/entity/car_7/car_7_green",
        "car_color_purple": "textures/octovon/spcrs/entity/car_7/car_7_purple",
        "car_color_red": "textures/octovon/spcrs/entity/car_7/car_7_red",
        "car_color_silver": "textures/octovon/spcrs/entity/car_7/car_7_silver",
        "car_color_yellow": "textures/octovon/spcrs/entity/car_7/car_7_yellow",
        "emissive": "textures/octovon/spcrs/entity/car_7/car_7_emissive",
        "translucent": "textures/octovon/spcrs/entity/car_7/car_7_translucent"
      },
      "geometry": {
        "default": "geometry.oct_spcrs.car_7"
      },
      "render_controllers": [
        "controller.render.oct_spcrs.car",
        {
          "controller.render.oct_spcrs.emissive.on": "q.has_rider"
        },
        {
          "controller.render.oct_spcrs.emissive.off": "!q.has_rider"
        },
        "controller.render.oct_spcrs.translucent"
      ],
      "animations": {
        "controller.wiggling": "controller.animation.oct_spcrs.common.wiggle",
        "controller.break": "controller.animation.oct_spcrs.car.break",
        "controller.spawn": "controller.animation.oct_spcrs.car.spawn",
        "controller.bounce": "controller.animation.oct_spcrs.car.bounce",
        "controller.headlight_particles": "controller.animation.octovon_spcrs.car.headlight_particles",
        "controller.speed_lines": "controller.animation.oct_spcrs.car.speed_lines",
        "controller.nitro": "controller.animation.oct_spcrs.car.nitro",
        "wiggle": "animation.oct_spcrs.common.wiggle",
        "bounce": "animation.oct_spcrs.car.bounce",
        "break": "animation.oct_spcrs.car.break",
        "spawn": "animation.oct_spcrs.car.spawn",
        "hidden": "animation.oct_spcrs.car.hidden",
        "drive": "animation.octovon_spcrs.car.drive",
        "drift_particles": "animation.octovon_spcrs.car.drift_particles",
        "drive_particles": "animation.octovon_spcrs.car.drive_particles",
        "headlight_particles": "animation.octovon_spcrs.car.headlight_particles",
        "speed_lines": "animation.oct_spcrs.car.speed_lines",
        "nitro_particles": "animation.oct_spcrs.car.nitro_2"
      },
      "particle_effects": {
        "drift_smoke": "oct_spcrs:drift_smoke_4",
        "tire_smear": "oct_spcrs:drift_smear",
        "drive_smoke": "oct_spcrs:drive_smoke",
        "headlight_glow": "oct_spcrs:headlight_glow",
        "headlight_beam": "oct_spcrs:headlight_beam",
        "speed_lines": "oct_spcrs:speed_lines",
        "nitro": "oct_sprs:nitro"
      },
      "scripts": {
        "initialize": [
          "variable.steer_angle = 0;",
          "variable.tilt_angle = 0;",
          "variable.tilt_factor = 2;",
          "variable.tire_speed = 0;",
          "variable.chassis_rot_damp = 0.05;",
          "variable.steering_wheel_rot_damp = 0.75;",
          "variable.wheel_rot_damp = 0.6;",
          "variable.is_drifting = 0;",
          "variable.lights_on = 0;"
        ],
        "pre_animation": [
          "variable.tire_speed = !q.property('oct_spcrs:anim.reverse') ? 40 : -25;",
          "variable.steer_angle = Math.lerp(variable.steer_angle, q.property('oct_spcrs:anim.reverse') ? -q.yaw_speed : q.yaw_speed, 0.1);",
          "variable.tilt_angle = Math.lerp(variable.tilt_angle, -q.vertical_speed*v.tilt_factor, 0.1);",
          "variable.is_drifting = (q.property('oct_spcrs:anim.drift')) && q.is_on_ground ? 1 : 0;",
          "variable.lights_on = !(q.time_of_day > 0.25 && q.time_of_day < 0.75) && q.has_rider;"
        ],
        "animate": [
          "controller.wiggling",
          "controller.bounce",
          "controller.break",
          "controller.spawn",
          "drive",
          {
            "drift_particles": "v.is_drifting"
          },
          {
            "drive_particles": "q.modified_move_speed >= 0.8 && q.is_on_ground"
          },
          "controller.headlight_particles",
          "controller.speed_lines",
          "controller.nitro"
        ]
      },
      "spawn_egg": {
        "base_color": "#252525",
        "overlay_color": "#5f5f5f"
      }
    }
  }
}