{
   "format_version":"1.20.80",
   "minecraft:block":{
      "description":{
         "identifier":"sgs_farm:grape_red",
         "menu_category":{
            "category":"none",
            "group":"none",
            "is_hidden_in_commands":false
         },
         "states":{
            "sgs_farm:height":[
               0,
               1,
               2
            ],
            "sgs_farm:growth":[
               0,
               1,
               2,
               3,
               4,
               5,
               6,
               7
            ]
         }
      },
      "components":{
         "minecraft:custom_components":[
            "sgs_farm:vine_frame_crop"
         ],
         "tag:sgs_farm_vine":{
            
         },
		 "minecraft:map_color": "#63a32f",
		 "minecraft:display_name":"Red Grape Block\n§dCreative§r\n§o§2Crops & Farms§r",
         "minecraft:geometry":{
            "identifier":"geometry.sgs_farm_crop_vine",
            "bone_visibility":{
               "fence_center":true,
               "fence_north":"q.block_state('sgs_farm:height') > 0",
               "fence_south":"q.block_state('sgs_farm:height') > 0",
               "fence_east":"q.block_state('sgs_farm:height') > 0",
               "fence_west":"q.block_state('sgs_farm:height') > 0",
               "vine_center":true,
               "leaves_center":"q.block_state('sgs_farm:height') == 1",
               "leaves_center_top":"q.block_state('sgs_farm:height') > 1",
               "grapes_northwest":"q.block_state('sgs_farm:height') > 0",
               "grapes_northeast":"q.block_state('sgs_farm:height') > 0",
               "grapes_southeast":"q.block_state('sgs_farm:height') > 0",
               "grapes_southwest":"q.block_state('sgs_farm:height') > 0"
            }
         },
         "minecraft:light_dampening":0,
         "minecraft:placement_filter":{
            "conditions":[
               {
                  "allowed_faces":[
                     "up"
                  ],
                  "block_filter":[
                     {
                        "tags":"query.any_tag('sgs_farm_vine')"
                     },
                     {
                        "name":"farmland"
                     }
                  ]
               }
            ]
         },
         "minecraft:selection_box":{
            "origin":[
               -4,
               0,
               -4
            ],
            "size":[
               8,
               16,
               8
            ]
         },
         "minecraft:collision_box":{
            "origin":[
               -4,
               0,
               -4
            ],
            "size":[
               8,
               16,
               8
            ]
         }
      },
      "permutations":[
         {
            "condition":"q.block_state('sgs_farm:growth') > 0",
            "components":{
               "minecraft:selection_box":{
                  "origin":[
                     -8,
                     0,
                     -8
                  ],
                  "size":[
                     16,
                     16,
                     16
                  ]
               },
               "minecraft:collision_box":{
                  "origin":[
                     -8,
                     0,
                     -8
                  ],
                  "size":[
                     16,
                     16,
                     16
                  ]
               }
            }
         },
		 {
            "condition":"q.block_state('sgs_farm:growth') < 7",
            "components":{
               "minecraft:loot":"loot_tables/sgs/farm/blocks/grape_red_seed.json"
            }
         },
         {
            "condition":"q.block_state('sgs_farm:growth') == 0",
            "components":{
               "minecraft:material_instances":{
                  "*":{
                     "face_dimming":true,
                     "ambient_occlusion":false,
                     "render_method":"alpha_test",
                     "texture":"sgs_farm_grape_red_1"
                  }
               }
            }
         },
         {
            "condition":"q.block_state('sgs_farm:growth') == 1",
            "components":{
               "minecraft:material_instances":{
                  "*":{
                     "face_dimming":true,
                     "ambient_occlusion":false,
                     "render_method":"alpha_test",
                     "texture":"sgs_farm_grape_red_1"
                  }
               }
            }
         },
         {
            "condition":"q.block_state('sgs_farm:growth') == 2",
            "components":{
               "minecraft:material_instances":{
                  "*":{
                     "face_dimming":true,
                     "ambient_occlusion":false,
                     "render_method":"alpha_test",
                     "texture":"sgs_farm_grape_red_1"
                  }
               }
            }
         },
         {
            "condition":"q.block_state('sgs_farm:growth') == 3",
            "components":{
               "minecraft:material_instances":{
                  "*":{
                     "face_dimming":true,
                     "ambient_occlusion":false,
                     "render_method":"alpha_test",
                     "texture":"sgs_farm_grape_red_2"
                  }
               }
            }
         },
         {
            "condition":"q.block_state('sgs_farm:growth') == 4",
            "components":{
               "minecraft:material_instances":{
                  "*":{
                     "face_dimming":true,
                     "ambient_occlusion":false,
                     "render_method":"alpha_test",
                     "texture":"sgs_farm_grape_red_2"
                  }
               }
            }
         },
         {
            "condition":"q.block_state('sgs_farm:growth') == 5",
            "components":{
               "minecraft:material_instances":{
                  "*":{
                     "face_dimming":true,
                     "ambient_occlusion":false,
                     "render_method":"alpha_test",
                     "texture":"sgs_farm_grape_red_2"
                  }
               }
            }
         },
         {
            "condition":"q.block_state('sgs_farm:growth') == 6",
            "components":{
               "minecraft:material_instances":{
                  "*":{
                     "face_dimming":true,
                     "ambient_occlusion":false,
                     "render_method":"alpha_test",
                     "texture":"sgs_farm_grape_red_2"
                  }
               }
            }
         },
         {
            "condition":"q.block_state('sgs_farm:growth') == 7",
            "components":{
               "minecraft:loot":"loot_tables/sgs/farm/blocks/grape_red_grown.json",
               "minecraft:material_instances":{
                  "*":{
                     "face_dimming":true,
                     "ambient_occlusion":false,
                     "render_method":"alpha_test",
                     "texture":"sgs_farm_grape_red_3"
                  }
               }
            }
         }
      ]
   }
}