{
  "format_version": "1.8.0",
  "render_controllers": {
    "controller.render.cyn_hao.fairy_armor": {
      // part visisbility set in ALL render controllers
      // since without it the head patterns were breaking,
      // presumably because the multiple RCs telling certain bones
      // to hide / unhide were conflicting
      "part_visibility": [
        { "HeadSaddle": "query.is_saddled" },
        { "Saddle": "query.is_saddled" },
        { "SaddleMouthR" : "query.is_saddled && query.has_rider" },
        { "SaddleMouthL" : "query.is_saddled && query.has_rider" },
        { "SaddleMouthLine" : "query.is_saddled && query.has_rider" },
        { "SaddleMouthLineR" : "query.is_saddled && query.has_rider" },
        
        { "Bags": "query.is_chested" },
        { "Bag1": "query.is_chested" },
        { "Bag2": "query.is_chested" },

        { "capeedges": "query.property('cyn_hao:carpet_color') > 0" },
        { "FL_cape": "query.property('cyn_hao:carpet_color') > 0" },
        { "FR_cape": "query.property('cyn_hao:carpet_color') > 0" },
        { "cape_sideL": "query.property('cyn_hao:carpet_color') > 0" },
        { "cape_sideR": "query.property('cyn_hao:carpet_color') > 0" },
        { "cape_back": "query.property('cyn_hao:carpet_color') > 0" }
      ],

      "arrays": {
        "textures": {
          "Array.armor": [
            "Texture.armor_none",
            "Texture.armor_leather",
            "Texture.armor_iron",
            "Texture.armor_gold",
            "Texture.armor_diamond"
          ]
        },

        "geometries": {
          "Array.geo": [
            "geometry.base_white",
            "geometry.base_orange",
            "geometry.base_magenta",
            "geometry.base_light_blue",
            "geometry.base_yellow",
            "geometry.base_lime",
            "geometry.base_pink",
            "geometry.base_gray",
            "geometry.base_light_gray",
            "geometry.base_cyan",
            "geometry.base_purple",
            "geometry.base_blue",
            "geometry.base_brown",
            "geometry.base_green",
            "geometry.base_red",
            "geometry.base_black"
          ]
        }
      },

    

      "materials": [
        { "*": "Material.armor" }
      ],

      "geometry": "Array.geo[query.property('cyn_hao:base_id')]",

      "textures": [

      // Unfortunately, it seems like using query.armor_color_slot in a material's
      // color field to set the color of a texture is currently bugged 
      // at the time of making this file:
      // https://bugs.mojang.com/browse/MCPE-183985

      // Therefore, we unfortunately have to just resolve to dyeing similar to
      // sheep, wolf and cat collars with the minecraft:is_dyeable component
      // and base our texture off the sheep texture instead of horse_leather_armor
      // not wholly sure how entity_change_color and is_dyeable interact since it
      // seems to be mostly hardcoded, but hey it works
        "Array.armor[query.property('cyn_hao:armor_type')]"
      ]
    }
  }
}
