{
	"format_version": "1.16.100",
	"minecraft:block": {
		"description": {
			"identifier": "medieval:birch_black_sofa",
			"properties": {
				"medieval:facing_direction": [
					0,
					1,
					2,
					3,
					4,
					5,
					6
				],
				"medieval:set_down": [
					"270_grades",
					"270_corner",
					"270_right",
					"270_left",
					"180_grades",
					"180_corner",
					"180_right",
					"180_left",
					"90_grades",
					"90_corner",
					"90_right",
					"90_left",
					"0_grades",
					"0_corner",
					"0_right",
					"0_left"
				]
			}
		},
		"permutations": [
			{
				"condition": "q.block_property('medieval:facing_direction') == 2",
				"components": {
					"minecraft:geometry": "geometry.couch_0",
					"minecraft:entity_collision": {
						"origin": [
							-8,
							8,
							-8
						],
						"size": [
							16,
							8,
							16
						]
					}
				}
			},
			{
				"condition": "q.block_property('medieval:facing_direction') == 3",
				"components": {
					"minecraft:geometry": "geometry.couch_2",
					"minecraft:entity_collision": {
						"origin": [
							-8,
							8,
							-8
						],
						"size": [
							16,
							8,
							16
						]
					}
				}
			},
			{
				"condition": "q.block_property('medieval:facing_direction') == 4",
				"components": {
					"minecraft:geometry": "geometry.couch_1",
					"minecraft:entity_collision": {
						"origin": [
							-8,
							8,
							-8
						],
						"size": [
							16,
							8,
							16
						]
					}
				}
			},
			{
				"condition": "q.block_property('medieval:facing_direction') == 5",
				"components": {
					"minecraft:geometry": "geometry.couch_3",
					"minecraft:entity_collision": {
						"origin": [
							-8,
							8,
							-8
						],
						"size": [
							16,
							8,
							16
						]
					}
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '270_grades' && q.block_property('medieval:facing_direction') == 0",
				"components": {
					"minecraft:geometry": "geometry.couch_2"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '270_grades' && (q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_large_3"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '270_corner' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_corner_3"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '270_right' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_right_3"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '270_left' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_left_3"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '180_grades' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_large_0"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '180_corner' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_corner_2"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '180_right' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_right_2"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '180_left' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_left_2"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '90_grades' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_large_1"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '90_corner' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_corner_1"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '90_right' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_right_1"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '90_left' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_left_1"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '0_grades' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_large_2"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '0_corner' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_corner_0"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '0_right' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_right_0"
				}
			},
			{
				"condition": "q.block_property('medieval:set_down') == '0_left' && (q.block_property('medieval:facing_direction') == 0 || q.block_property('medieval:facing_direction') == 1 || q.block_property('medieval:facing_direction') == 6)",
				"components": {
					"minecraft:geometry": "geometry.couch_left_0"
				}
			}
		],
		"components": {
			"minecraft:geometry": "geometry.couch_2",
			"minecraft:material_instances": {
				"stripped_wood": {
					"texture": "stripped_birch",
					"render_method": "opaque",
					"ambient_occlusion": true,
					"face_dimming": true
				},
				"pillow": {
					"texture": "black_bed",
					"render_method": "opaque",
					"ambient_occlusion": true,
					"face_dimming": true
				}
			},
			"minecraft:on_player_placing": {
				"event": "set_facing_direction"
			},
			"minecraft:entity_collision": {
				"origin": [
					-8,
					0.0,
					-8
				],
				"size": [
					16,
					8,
					16
				]
			},
			"minecraft:block_light_absorption": 1.0,
			"minecraft:block_light_emission": 0.0,
			"minecraft:explosion_resistance": 3.0,
			"minecraft:creative_category": {
				"category": "construction",
				"group": "itemGroup.name.stairs"
			},
			"minecraft:flammable": {
				"flame_odds": 20,
				"burn_odds": 5
			},
			"minecraft:map_color": "#000000",
			"minecraft:destroy_time": 0.8
		},
		"events": {
			"set_facing_direction": {
				"sequence": [
					{
						"set_block_property": {
							"medieval:facing_direction": "q.cardinal_block_face_placed_on"
						}
					},
					{
						"set_block_property": {
							"medieval:set_down": "((q.head_y_rotation(0) >= -11.5 && q.head_y_rotation(0) < 0.0) ? '0_grades' :((q.head_y_rotation(0) >= 0.0 && q.head_y_rotation(0) < 11.5) ? '0_grades' :((q.head_y_rotation(0) >= 11.5 && q.head_y_rotation(0) < 33.5) ? '0_right' :((q.head_y_rotation(0) >= 33.5 && q.head_y_rotation(0) < 56.5) ? '0_corner' :((q.head_y_rotation(0) >= 56.5 && q.head_y_rotation(0) < 78.5) ? '0_left' :((q.head_y_rotation(0) >= 78.5 && q.head_y_rotation(0) < 101.5) ? '90_grades' :((q.head_y_rotation(0) >= 101.5 && q.head_y_rotation(0) < 123.5) ? '90_right' :((q.head_y_rotation(0) >= 123.5 && q.head_y_rotation(0) < 146.5) ? '90_corner' :((q.head_y_rotation(0) >= 146.5 && q.head_y_rotation(0) < 168.5) ? '90_left' :((q.head_y_rotation(0) >= 168.5 && q.head_y_rotation(0) < 180.0) ? '180_grades' :((q.head_y_rotation(0) >= -180.0 && q.head_y_rotation(0) < -168.5) ? '180_grades' :((q.head_y_rotation(0) >= -168.5 && q.head_y_rotation(0) < -146.5) ? '180_right' :((q.head_y_rotation(0) >= -146.5 && q.head_y_rotation(0) < -123.5) ? '180_corner' :((q.head_y_rotation(0) >= -123.5 && q.head_y_rotation(0) < -101.5) ? '180_left' :((q.head_y_rotation(0) >= -101.5 && q.head_y_rotation(0) < -78.5) ? '270_grades' :((q.head_y_rotation(0) >= -78.5 && q.head_y_rotation(0) < -56.5) ? '270_right' :((q.head_y_rotation(0) >= -56.5 && q.head_y_rotation(0) < -33.5) ? '270_corner' :((q.head_y_rotation(0) >= -33.5 && q.head_y_rotation(0) < -11.5) ? '270_left' : '0_grades'))))))))))))))))))"
						}
					}
				]
			}
		}
	}
}