{
  "format_version": "1.8.0",
  "render_controllers": {
    // separate render controllers for carpets and armor,
    // since armor needs to use the horse_leather_armor material
    "controller.render.cyn_hao.fairy_carpet": {
      // 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.carpet": [
            "Texture.carpet_none",
            "Texture.carpet_white", 
            "Texture.carpet_orange", 
            "Texture.carpet_magenta", 
            "Texture.carpet_light_blue", 
            "Texture.carpet_yellow", 
            "Texture.carpet_lime", 
            "Texture.carpet_pink", 
            "Texture.carpet_gray", 
            "Texture.carpet_light_gray", 
            "Texture.carpet_cyan", 
            "Texture.carpet_purple", 
            "Texture.carpet_blue", 
            "Texture.carpet_brown", 
            "Texture.carpet_green", 
            "Texture.carpet_red", 
            "Texture.carpet_black",
            "Texture.carpet_moss"
          ]
        },
        "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.alphatest" }
      ],

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

      "textures": [
        "Array.carpet[query.property('cyn_hao:carpet_color')]"
      ]
    }
  }
}
