{
	"format_version": "1.20.20",
	"minecraft:block": {
		"description": {
			"identifier": "sgs_farm:workbench",
			"menu_category": {
				"category": "items"
			},
			"states":{
				"sgs_farm:crafting_station":[
					0,1,2,3
				],
				"sgs_farm:workbench_plank":[
				   0,1,2,3
				]
			},
			"traits": {
				"minecraft:placement_direction": {
					"enabled_states": ["minecraft:cardinal_direction"]
				}
			}
		},
		"components": {
			"minecraft:map_color": "#664c33",
			"minecraft:custom_components": [
				"sgs_farm:workbench"
			],
			"minecraft:display_name": "Workbench\n§nWorkbench Base§r\n§o§2Crops & Farms§r",
			"minecraft:destructible_by_mining": {
				"seconds_to_destroy": 1.0
			},
			"minecraft:destructible_by_explosion": {
				"explosion_resistance": 15
			},
			"minecraft:geometry":{
				"identifier":"geometry.sgs_farm_fun_workbench",
				"bone_visibility":{
				   "side_west": false,
				   "side_east": false,
				   
				   "leg_northwest": true,
				   "leg_southwest": true,
				   "leg_northeast": true,
				   "leg_southeast": true,
				   
				   "plank_1":"q.block_state('sgs_farm:workbench_plank') > 0",
				   "plank_2":"q.block_state('sgs_farm:workbench_plank') > 1",
				   "plank_3":"q.block_state('sgs_farm:workbench_plank') > 2",
				   
				   "plank_4":	false,
				   "plank_5":	false
				}
			},
			"minecraft:material_instances": {
				"*": {
							"face_dimming": true,
							"ambient_occlusion": false,
							"render_method": "alpha_test",
							"texture": "sgs_farm_workbench"
				}
			},
			"minecraft:light_dampening": 0,
			"tag:sgs_farm_workbench_base": {}
		},
		"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]
					}
				}
			},
			{
                "condition": "q.block_state('sgs_farm:crafting_station') == 1",
                "components": {
                    "minecraft:display_name":"Workbench",
					"minecraft:crafting_table": {
					  "grid_size": 3,
					  "crafting_tags": [
						"sgs_farm_workbench"
					  ]
					}
                }
            },
			{
                "condition": "q.block_state('sgs_farm:crafting_station') == 2",
                "components": {
                    "minecraft:display_name":"Blueprints",
					"minecraft:crafting_table": {
					  "grid_size": 3,
					  "crafting_tags": [
						"sgs_farm_workbench_blueprint"
					  ]
					}
                }
            },
			{
                "condition": "q.block_state('sgs_farm:crafting_station') == 3",
                "components": {
                    "minecraft:display_name":"Paint Station",
					"minecraft:crafting_table": {
					  "grid_size": 3,
					  "crafting_tags": [
						"sgs_farm_workbench_paint"
					  ]
					}
                }
            }
		]
	}
}