{
	"format_version": "1.21.60",
	"minecraft:block": {
		"description": {
			"identifier": "scpcf:small_facility_crate",
			"states": {
				"scpclassified:rotation": [
					0,
					1,
					2,
					3,
					4,
					5,
					6,
					7,
					8,
					9,
					10,
					11,
					12,
					13,
					14,
					15
				]
			},
			"traits": {
				"minecraft:placement_position": {
					"enabled_states": [
						"minecraft:block_face"
					]
				}
			}
		},
		"components": {
			"minecraft:custom_components": [
				"scpclassified:blockrotation"
			],
			"minecraft:destructible_by_mining": {
				"seconds_to_destroy": 1.3
			},
			"minecraft:destructible_by_explosion": {
				"explosion_resistance": 1.6
			},
			"minecraft:collision_box": {
				"origin": [
					-4,
					0,
					-4
				],
				"size": [
					8,
					8,
					8
				]
			},
			"minecraft:selection_box": {
				"origin": [
					-4,
					0,
					-4
				],
				"size": [
					8,
					8,
					8
				]
			},
			"minecraft:material_instances": {
				"*": {
					"texture": "scpclassifiedIsmallfacilitycratetexture"
				}
			},
			"minecraft:geometry": {
				"identifier": "geometry.scpclassifiedheadmodel",
				"bone_visibility": {
					"boxrotation1": "q.block_state('minecraft:block_face') == 'up' && !math.mod(q.block_state('scpclassified:rotation'), 4)",
					"boxrotation2": "q.block_state('minecraft:block_face') == 'up' && !math.mod(q.block_state('scpclassified:rotation') - 1, 4)",
					"boxrotation3": "q.block_state('minecraft:block_face') == 'up' && !math.mod(q.block_state('scpclassified:rotation') - 2, 4)",
					"boxrotation4": "q.block_state('minecraft:block_face') == 'up' && !math.mod(q.block_state('scpclassified:rotation') - 3, 4)",
					"boxrotation5": "q.block_state('minecraft:block_face') != 'up'"
				}
			},
			"minecraft:map_color": "#828080",
			"minecraft:liquid_detection": {
				"detection_rules": [
					{
						"can_contain_liquid": true
					}
				]
			},
			"minecraft:light_dampening": 0
		},
		"permutations": [
			{
				"condition": "q.block_state('minecraft:block_face') == 'east' || q.block_state('scpclassified:rotation') >= 4",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							-90,
							0
						]
					}
				}
			},
			{
				"condition": "q.block_state('minecraft:block_face') == 'south' || q.block_state('scpclassified:rotation') >= 8",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							180,
							0
						]
					}
				}
			},
			{
				"condition": "q.block_state('minecraft:block_face') == 'west' || q.block_state('scpclassified:rotation') >= 12",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							90,
							0
						]
					}
				}
			}
		]
	}
}