{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:donkey",
      "min_engine_version": "1.17.10",
      "materials": {
        "default": "horse"
      },
      "textures": {
        "default": "textures/entity/horse2/donkey",
        "default2": "assets/minecraft/optifine/random/entity/horse/donkey2",
        "default3": "assets/minecraft/optifine/random/entity/horse/donkey4",
        "default4": "assets/minecraft/optifine/random/entity/horse/donkey4",
        "default5": "assets/minecraft/optifine/random/entity/horse/donkey2",
        "default6": "assets/minecraft/optifine/random/entity/horse/donkey6",
        "default7": "assets/minecraft/optifine/random/entity/horse/donkey4",
        "default8": "assets/minecraft/optifine/random/entity/horse/donkey2"
      },
      "geometry": {
        "default": "geometry.horse.v3",
        "default2": "geometry.nugget_donkey",
        "default3": "geometry.nugget_donkey",
        "default4": "geometry.nugget_donkey4",
        "default5": "geometry.nugget_donkey4",
        "default6": "geometry.nugget_donkey5",
        "default7": "geometry.nugget_donkey6",
        "default8": "geometry.nugget_donkey6"
      },
      "animations": {
        "baby_transform": "animation.horse.v3.baby_transform",
        "walk": "animation.horse.v3.walk",
        "eat": "animation.horse.v3.eat",
        "rear": "animation.horse.v3.rear",
        "tail": "animation.horse.v3.tail",
        "look_at_player": "animation.horse.v3.look_at_player",
        "riding": "animation.horse.v3.riding",
        
        "nugget_baby_transform": "animation.nugget_horse.v3.baby_transform",
        "nugget_walk": "animation.nugget_horse.v3.walk",
        "nugget_eat": "animation.nugget_horse.v3.eat",
        "nugget_rear": "animation.nugget_horse.v3.rear",
        "nugget_tail": "animation.nugget_horse.v3.tail",
        "nugget_look_at_player": "animation.nugget_horse.v3.look_at_player",
        "nugget_riding": "animation.nugget_horse.v3.riding"
      },
      "scripts": {
        "scale": "0.87",
        "initialize": [
          "variable.eat_anim = 0.0;"
        ],
        "pre_animation": [
          "variable.eat_anim = math.clamp(variable.eat_anim + (query.is_grazing ? ((1.0 - variable.eat_anim) * 0.4 + 0.05) : -variable.eat_anim * 0.4 - 0.05) * query.delta_time * 20.0, 0.0, 1.0);",
          "variable.head_x_rot = query.target_x_rotation + (query.modified_move_speed > 0.2 ? (math.cos(query.modified_distance_moved * 11.46) * 11.46 * query.modified_move_speed + query.modified_move_speed * 11.46) : 0.0);",
          "variable.inverse_max_stand_eat = (1.0 - math.max(variable.stand_anim, variable.eat_anim));",
          "variable.leg_stand_factor = math.cos((query.modified_distance_moved * 38.38) + 180.0);",
          "variable.leg_x_rot_anim = variable.leg_stand_factor * 45.8 * query.modified_move_speed;",
          "variable.Xvar = (variable.Xvar ?? Math.random(0,999));"
        ],
        "animate": [
          { "baby_transform": "query.is_baby" },
          "walk",
          "look_at_player",
          { "rear": "variable.stand_anim > 0.0" },
          { "eat": "!query.is_standing" },
          { "tail": "variable.shake_tail" },
          { "riding": "query.is_riding" },
          
          { "nugget_baby_transform": "query.is_baby" },
          "nugget_walk",
          "nugget_look_at_player",
          { "nugget_rear": "variable.stand_anim > 0.0" },
          { "nugget_eat": "!query.is_standing" },
          { "nugget_tail": "variable.shake_tail" },
          { "nugget_riding": "query.is_riding" }
        ]
      },
      "render_controllers": [ "controller.render.donkey" ],
      "spawn_egg": {
        "texture": "spawn_egg",
        "texture_index": 30
      }
    }
  }
}