{
	"format_version": "1.20.80",
	"minecraft:block": {
		"description": {
			"identifier": "sgs_farm:window_farm_painted_white_d",
			"menu_category": {
				"category": "none",
				"group": "none",
				"is_hidden_in_commands": false
			},
			"traits": {
				"minecraft:placement_direction": {
					"enabled_states": ["minecraft:cardinal_direction"]
				}
			},
			"states":{
				"sgs_farm:is_upper":[
					0,
					1
				]
			}
		},
		"components": {
			"minecraft:custom_components": [
				"sgs_farm:window_double"
			],
			"tag:sgs_farm_window": {},
			"minecraft:loot": "loot_tables/sgs/farm/blocks/window_farm_painted_white_d.json",
			"minecraft:display_name":"White Painted Double Farmhouse Window\n§o§2Crops & Farms§r",
			"minecraft:destructible_by_mining": {
				"seconds_to_destroy": 0.3
			},
			"minecraft:destructible_by_explosion": {
				"explosion_resistance": 15
			},
			"minecraft:geometry":{
				"identifier":"geometry.sgs_farm_dec_window_farm_d",
				"bone_visibility":{
				   "bottom":"!q.block_state('sgs_farm:is_upper')",
				   "top":"q.block_state('sgs_farm:is_upper')"
				}
			},
			
			"minecraft:material_instances": {
				"*": {
							"face_dimming": true,
							"ambient_occlusion": false,
							"render_method": "alpha_test",
							"texture": "sgs_farm_window_farm_white"
				}
			},
			"minecraft:light_dampening": 0,
			"minecraft:collision_box": {
				"origin": [-8, 0, -2],
				"size": [16, 16, 4]
			},
			"minecraft:selection_box": {
				"origin": [-8, 0, -2],
				"size": [16, 16, 4]
			},
			"minecraft:map_color": "#5f4a2b"
		},
		"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:is_upper') == 1",
                "components": {
					"minecraft:loot": "loot_tables/sgs/farm/misc/none.json",
					"minecraft:placement_filter": {
						"conditions":[
						   {
							  "allowed_faces":[
								 "up"
							  ],
							  "block_filter":[
								 {
									"tags":"query.any_tag('sgs_farm_window')"
								 }
							  ]
						   }
						]
					}
                }
            }
		]
	}
}