{
   "format_version":"1.20.80",
   "minecraft:block":{
      "description":{
         "identifier":"sgs_farm:jar_rack",
         "menu_category":{
            "category": "none",
			"group": "none",
			"is_hidden_in_commands": false
         },
         "traits":{
            "minecraft:placement_direction":{
               "enabled_states":[
                  "minecraft:cardinal_direction"
               ]
            }
         },
         "states":{
            "sgs_farm:rack_sections":[
               0,
               1,
               2,
               3
            ],
            "sgs_farm:type":[
               0,1,2,3,4,5,6,7,8,9,10,11
            ]
         }
      },
      "components":{
         "minecraft:display_name":"Jar Shelf\n§nHolds up to 4 Jars§r\n§o§2Crops & Farms§r",
		 "minecraft:loot": "loot_tables/sgs/farm/blocks/misc/jar_rack.json",  
		 "minecraft:custom_components":[
            "sgs_farm:glass_rack"
         ],
         "minecraft:geometry":{
            "identifier":"geometry.sgs_farm_dec_jar_glass",
            "bone_visibility":{
               "jar_empty_1":"q.block_state('sgs_farm:rack_sections') >= 0 && q.block_state('sgs_farm:type') == 1",
			   "jar_strawberry_1":"q.block_state('sgs_farm:rack_sections') >= 0 && q.block_state('sgs_farm:type') == 2",
			   "jar_raspberry_1":"q.block_state('sgs_farm:rack_sections') >= 0 && q.block_state('sgs_farm:type') == 3",
			   "jar_blackberry_1":"q.block_state('sgs_farm:rack_sections') >= 0 && q.block_state('sgs_farm:type') == 4",
			   "jar_blueberry_1":"q.block_state('sgs_farm:rack_sections') >= 0 && q.block_state('sgs_farm:type') == 5",
			   "jar_gooseberry_1":"q.block_state('sgs_farm:rack_sections') >= 0 && q.block_state('sgs_farm:type') == 6",
			   "jar_pesto_1":"q.block_state('sgs_farm:rack_sections') >= 0 && q.block_state('sgs_farm:type') == 7",
			   "jar_peanut_1":"q.block_state('sgs_farm:rack_sections') >= 0 && q.block_state('sgs_farm:type') == 8",
			   "jar_chocolate_1":"q.block_state('sgs_farm:rack_sections') >= 0 && q.block_state('sgs_farm:type') == 9",
			   "jar_tomato_1":"q.block_state('sgs_farm:rack_sections') >= 0 && q.block_state('sgs_farm:type') == 10",
			   "jar_bolognese_1":"q.block_state('sgs_farm:rack_sections') >= 0 && q.block_state('sgs_farm:type') == 11",
			   
			   "jar_empty_2":"q.block_state('sgs_farm:rack_sections') >= 1 && q.block_state('sgs_farm:type') == 1",
			   "jar_strawberry_2":"q.block_state('sgs_farm:rack_sections') >= 1 && q.block_state('sgs_farm:type') == 2",
			   "jar_raspberry_2":"q.block_state('sgs_farm:rack_sections') >= 1 && q.block_state('sgs_farm:type') == 3",
			   "jar_blackberry_2":"q.block_state('sgs_farm:rack_sections') >= 1 && q.block_state('sgs_farm:type') == 4",
			   "jar_blueberry_2":"q.block_state('sgs_farm:rack_sections') >= 1 && q.block_state('sgs_farm:type') == 5",
			   "jar_gooseberry_2":"q.block_state('sgs_farm:rack_sections') >= 1 && q.block_state('sgs_farm:type') == 6",
			   "jar_pesto_2":"q.block_state('sgs_farm:rack_sections') >= 1 && q.block_state('sgs_farm:type') == 7",
			   "jar_peanut_2":"q.block_state('sgs_farm:rack_sections') >= 1 && q.block_state('sgs_farm:type') == 8",
			   "jar_chocolate_2":"q.block_state('sgs_farm:rack_sections') >= 1 && q.block_state('sgs_farm:type') == 9",
			   "jar_tomato_2":"q.block_state('sgs_farm:rack_sections') >= 1 && q.block_state('sgs_farm:type') == 10",
			   "jar_bolognese_2":"q.block_state('sgs_farm:rack_sections') >= 1 && q.block_state('sgs_farm:type') == 11",
			   
			   "shelf_2":"q.block_state('sgs_farm:rack_sections') >= 2",
			   
			   "jar_empty_3":"q.block_state('sgs_farm:rack_sections') >= 2 && q.block_state('sgs_farm:type') == 1",
			   "jar_strawberry_3":"q.block_state('sgs_farm:rack_sections') >= 2 && q.block_state('sgs_farm:type') == 2",
			   "jar_raspberry_3":"q.block_state('sgs_farm:rack_sections') >= 2 && q.block_state('sgs_farm:type') == 3",
			   "jar_blackberry_3":"q.block_state('sgs_farm:rack_sections') >= 2 && q.block_state('sgs_farm:type') == 4",
			   "jar_blueberry_3":"q.block_state('sgs_farm:rack_sections') >= 2 && q.block_state('sgs_farm:type') == 5",
			   "jar_gooseberry_3":"q.block_state('sgs_farm:rack_sections') >= 2 && q.block_state('sgs_farm:type') == 6",
			   "jar_pesto_3":"q.block_state('sgs_farm:rack_sections') >= 2 && q.block_state('sgs_farm:type') == 7",
			   "jar_peanut_3":"q.block_state('sgs_farm:rack_sections') >= 2 && q.block_state('sgs_farm:type') == 8",
			   "jar_chocolate_3":"q.block_state('sgs_farm:rack_sections') >= 2 && q.block_state('sgs_farm:type') == 9",
			   "jar_tomato_3":"q.block_state('sgs_farm:rack_sections') >= 2 && q.block_state('sgs_farm:type') == 10",
			   "jar_bolognese_3":"q.block_state('sgs_farm:rack_sections') >= 2 && q.block_state('sgs_farm:type') == 11",
			   
			   "jar_empty_4":"q.block_state('sgs_farm:rack_sections') >= 3 && q.block_state('sgs_farm:type') == 1",
			   "jar_strawberry_4":"q.block_state('sgs_farm:rack_sections') >= 3 && q.block_state('sgs_farm:type') == 2",
			   "jar_raspberry_4":"q.block_state('sgs_farm:rack_sections') >= 3 && q.block_state('sgs_farm:type') == 3",
			   "jar_blackberry_4":"q.block_state('sgs_farm:rack_sections') >= 3 && q.block_state('sgs_farm:type') == 4",
			   "jar_blueberry_4":"q.block_state('sgs_farm:rack_sections') >= 3 && q.block_state('sgs_farm:type') == 5",
			   "jar_gooseberry_4":"q.block_state('sgs_farm:rack_sections') >= 3 && q.block_state('sgs_farm:type') == 6",
			   "jar_pesto_4":"q.block_state('sgs_farm:rack_sections') >= 3 && q.block_state('sgs_farm:type') == 7",
			   "jar_peanut_4":"q.block_state('sgs_farm:rack_sections') >= 3 && q.block_state('sgs_farm:type') == 8",
			   "jar_chocolate_4":"q.block_state('sgs_farm:rack_sections') >= 3 && q.block_state('sgs_farm:type') == 9",
			   "jar_tomato_4":"q.block_state('sgs_farm:rack_sections') >= 3 && q.block_state('sgs_farm:type') == 10",
			   "jar_bolognese_4":"q.block_state('sgs_farm:rack_sections') >= 3 && q.block_state('sgs_farm:type') == 11"
            }
         },
         "minecraft:light_dampening":0,
         "minecraft:material_instances":{
            "*":{
               "face_dimming":true,
               "ambient_occlusion":false,
               "render_method":"alpha_test",
               "texture":"sgs_farm_jar_glass"
            }
         },
         "minecraft:selection_box":{
            "origin": [
				-8,
				0,
				0
			],
			"size": [
				16,
				16,
				8
			]
         },
		 "minecraft:collision_box":{
			"origin": [
				-8,
				0,
				0
			],
			"size": [
				16,
				16,
				8
			]
		 }
      },
      "permutations":[
         {
            "condition":"q.block_state('minecraft:cardinal_direction') == 'north' ",
            "components":{
               "minecraft:transformation":{
                  "rotation":[
                     0,
                     180,
                     0
                  ]
               }
            }
         },
         {
            "condition":"q.block_state('minecraft:cardinal_direction') == 'south' ",
            "components":{
               "minecraft:transformation":{
                  "rotation":[
                     0,
                     0,
                     0
                  ]
               }
            }
         },
         {
            "condition":"q.block_state('minecraft:cardinal_direction') == 'east' ",
            "components":{
               "minecraft:transformation":{
                  "rotation":[
                     0,
                     90,
                     0
                  ]
               }
            }
         },
         {
            "condition":"q.block_state('minecraft:cardinal_direction') == 'west' ",
            "components":{
               "minecraft:transformation":{
                  "rotation":[
                     0,
                     270,
                     0
                  ]
               }
            }
         }
      ]
   }
}