{
	"format_version": "1.20.20",
	"minecraft:block": {
		"description": {
			"identifier": "lv_te:advanced_pipe",
			"menu_category": {
				"category": "construction"
			},
			"traits": {
				"minecraft:placement_position": {
                    "enabled_states": ["minecraft:block_face"]
                }
			},
			"states": {
				"lv_te:has_items": [
					false,
					true
				],
				"lv_te:color": [
					0,
					1,
					2,
					3,
					4,
					5
				],
				"lv_te:is_connector": [
					false,
					true
				],
				"lv_te:east": [
					false,
					true
				],
				"lv_te:north": [
					false,
					true
				],
				"lv_te:south": [
					false,
					true
				],
				"lv_te:west": [
					false,
					true
				],
				"lv_te:up": [
					false,
					true
				],
				"lv_te:down": [
					false,
					true
				]
			}
		},
		"components": {
			"minecraft:collision_box": {
				"origin": [
					-3,
					6,
					-8
				],
				"size": [
					6,
					6,
					16
				]
			},
			"minecraft:selection_box":{
				"origin": [
					-3,
					5,
					-3
				],
				"size": [
					6,
					6,
					6
				]
			},
			"minecraft:destructible_by_mining": {
				"seconds_to_destroy": 0.05
			},
			"minecraft:destructible_by_explosion": false,
			"minecraft:geometry": {
				"identifier": "geometry.lv_te.advanced_pipe",
				"bone_visibility": {
					"root": "q.block_state('lv_te:color') == 0",
					"connector": "q.block_state('lv_te:color') == 0 && (q.block_state('lv_te:is_connector') || q.block_state('lv_te:west') || q.block_state('lv_te:east') || q.block_state('lv_te:up') || q.block_state('lv_te:down'))",
					"south": "q.block_state('lv_te:color') == 0 && q.block_state('lv_te:south')",
					"north": "q.block_state('lv_te:color') == 0 && q.block_state('lv_te:north')",
					"west": "q.block_state('lv_te:color') == 0 && q.block_state('lv_te:west') ",
					"east": "q.block_state('lv_te:color') == 0 && q.block_state('lv_te:east')",
					"up": "q.block_state('lv_te:color') == 0 && q.block_state('lv_te:up')",
					"down": "q.block_state('lv_te:color') == 0 && q.block_state('lv_te:down')",
					"connector_active": "q.block_state('lv_te:color') == 0 && q.block_state('lv_te:has_items') && (q.block_state('lv_te:is_connector') || q.block_state('lv_te:west') || q.block_state('lv_te:east') || q.block_state('lv_te:up') || q.block_state('lv_te:down'))",
					"root_active": "q.block_state('lv_te:color') == 0 && q.block_state('lv_te:has_items')",

					"root2": "q.block_state('lv_te:color') == 1",
					"connector2": "q.block_state('lv_te:color') == 1 && (q.block_state('lv_te:is_connector') || q.block_state('lv_te:west') || q.block_state('lv_te:east') || q.block_state('lv_te:up') || q.block_state('lv_te:down'))",
					"south2": "q.block_state('lv_te:color') == 1 && q.block_state('lv_te:south')",
					"north2": "q.block_state('lv_te:color') == 1 && q.block_state('lv_te:north')",
					"west2": "q.block_state('lv_te:color') == 1 && q.block_state('lv_te:west') ",
					"east2": "q.block_state('lv_te:color') == 1 && q.block_state('lv_te:east')",
					"up2": "q.block_state('lv_te:color') == 1 && q.block_state('lv_te:up')",
					"down2": "q.block_state('lv_te:color') == 1 && q.block_state('lv_te:down')",
					"connector_active2": "q.block_state('lv_te:color') == 1 && q.block_state('lv_te:has_items') && (q.block_state('lv_te:is_connector') || q.block_state('lv_te:west') || q.block_state('lv_te:east') || q.block_state('lv_te:up') || q.block_state('lv_te:down'))",
					"root_active2": "q.block_state('lv_te:color') == 1 && q.block_state('lv_te:has_items')",

					"root3": "q.block_state('lv_te:color') == 2",
					"connector3": "q.block_state('lv_te:color') == 2 && (q.block_state('lv_te:is_connector') || q.block_state('lv_te:west') || q.block_state('lv_te:east') || q.block_state('lv_te:up') || q.block_state('lv_te:down'))",
					"south3": "q.block_state('lv_te:color') == 2 && q.block_state('lv_te:south')",
					"north3": "q.block_state('lv_te:color') == 2 && q.block_state('lv_te:north')",
					"west3": "q.block_state('lv_te:color') == 2 && q.block_state('lv_te:west') ",
					"east3": "q.block_state('lv_te:color') == 2 && q.block_state('lv_te:east')",
					"up3": "q.block_state('lv_te:color') == 2 && q.block_state('lv_te:up')",
					"down3": "q.block_state('lv_te:color') == 2 && q.block_state('lv_te:down')",
					"connector_active3": "q.block_state('lv_te:color') == 2 && q.block_state('lv_te:has_items') && (q.block_state('lv_te:is_connector') || q.block_state('lv_te:west') || q.block_state('lv_te:east') || q.block_state('lv_te:up') || q.block_state('lv_te:down'))",
					"root_active3": "q.block_state('lv_te:color') == 2 && q.block_state('lv_te:has_items')",

					"root4": "q.block_state('lv_te:color') == 3",
					"connector4": "q.block_state('lv_te:color') == 3 && (q.block_state('lv_te:is_connector') || q.block_state('lv_te:west') || q.block_state('lv_te:east') || q.block_state('lv_te:up') || q.block_state('lv_te:down'))",
					"south4": "q.block_state('lv_te:color') == 3 && q.block_state('lv_te:south')",
					"north4": "q.block_state('lv_te:color') == 3 && q.block_state('lv_te:north')",
					"west4": "q.block_state('lv_te:color') == 3 && q.block_state('lv_te:west') ",
					"east4": "q.block_state('lv_te:color') == 3 && q.block_state('lv_te:east')",
					"up4": "q.block_state('lv_te:color') == 3 && q.block_state('lv_te:up')",
					"down4": "q.block_state('lv_te:color') == 3 && q.block_state('lv_te:down')",
					"connector_active4": "q.block_state('lv_te:color') == 3 && q.block_state('lv_te:has_items') && (q.block_state('lv_te:is_connector') || q.block_state('lv_te:west') || q.block_state('lv_te:east') || q.block_state('lv_te:up') || q.block_state('lv_te:down'))",
					"root_active4": "q.block_state('lv_te:color') == 3 && q.block_state('lv_te:has_items')",

					"root5": "q.block_state('lv_te:color') == 4",
					"connector5": "q.block_state('lv_te:color') == 4 && (q.block_state('lv_te:is_connector') || q.block_state('lv_te:west') || q.block_state('lv_te:east') || q.block_state('lv_te:up') || q.block_state('lv_te:down'))",
					"south5": "q.block_state('lv_te:color') == 4 && q.block_state('lv_te:south')",
					"north5": "q.block_state('lv_te:color') == 4 && q.block_state('lv_te:north')",
					"west5": "q.block_state('lv_te:color') == 4 && q.block_state('lv_te:west') ",
					"east5": "q.block_state('lv_te:color') == 4 && q.block_state('lv_te:east')",
					"up5": "q.block_state('lv_te:color') == 4 && q.block_state('lv_te:up')",
					"down5": "q.block_state('lv_te:color') == 4 && q.block_state('lv_te:down')",
					"connector_active5": "q.block_state('lv_te:color') == 4 && q.block_state('lv_te:has_items') && (q.block_state('lv_te:is_connector') || q.block_state('lv_te:west') || q.block_state('lv_te:east') || q.block_state('lv_te:up') || q.block_state('lv_te:down'))",
					"root_active5": "q.block_state('lv_te:color') == 4 && q.block_state('lv_te:has_items')",

					"root6": "q.block_state('lv_te:color') == 5",
					"connector6": "q.block_state('lv_te:color') == 5 && (q.block_state('lv_te:is_connector') || q.block_state('lv_te:west') || q.block_state('lv_te:east') || q.block_state('lv_te:up') || q.block_state('lv_te:down'))",
					"south6": "q.block_state('lv_te:color') == 5 && q.block_state('lv_te:south')",
					"north6": "q.block_state('lv_te:color') == 5 && q.block_state('lv_te:north')",
					"west6": "q.block_state('lv_te:color') == 5 && q.block_state('lv_te:west') ",
					"east6": "q.block_state('lv_te:color') == 5 && q.block_state('lv_te:east')",
					"up6": "q.block_state('lv_te:color') == 5 && q.block_state('lv_te:up')",
					"down6": "q.block_state('lv_te:color') == 5 && q.block_state('lv_te:down')",
					"connector_active6": "q.block_state('lv_te:color') == 5 && q.block_state('lv_te:has_items') && (q.block_state('lv_te:is_connector') || q.block_state('lv_te:west') || q.block_state('lv_te:east') || q.block_state('lv_te:up') || q.block_state('lv_te:down'))",
					"root_active6": "q.block_state('lv_te:color') == 5 && q.block_state('lv_te:has_items')"
				}
			},
			"minecraft:material_instances": {
				"*": {
					"texture": "lv_te:advanced_pipe",
					"render_method": "alpha_test"
				}
			},
			"minecraft:map_color": "#494949"
		},
		"permutations": [
			{
				"condition": "q.block_state('minecraft:block_face') == 'up' ",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							-90,
							0,
							0
						]
					}
				}
			},
			{
				"condition": "q.block_state('minecraft:block_face') == 'down' ",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							90,
							0,
							0
						]
					}
				}
			},
			{
				"condition": "q.block_state('minecraft:block_face') == 'north' ",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							180,
							0
						]
					}
				}
			},
			{
				"condition": "q.block_state('minecraft:block_face') == 'south' ",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							0,
							0
						]
					}
				}
			},
			{
				"condition": "q.block_state('minecraft:block_face') == 'east' ",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							90,
							0
						]
					}
				}
			},
			{
				"condition": "q.block_state('minecraft:block_face') == 'west' ",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							-90,
							0
						]
					}
				}
			}
		]
	}
}