//bridge-file-version: #12
{
	"minecraft:block": {
		"description": {
			"properties": {
				"bridge:block_rotation": [
					2,
					3,
					4,
					5
				],
				"hf:active": [
					0,
					1,
					2,
					3,
					4,
					5,
					6,
					7
				],
				"hf:movement": [
					0,
					1,
					2
				]
			},
			"identifier": "hf:curtain"
		},
		"permutations": [
			{
				"condition": "query.block_property('bridge:block_rotation') == 2",
				"components": {
					"minecraft:rotation": [
						0,
						180,
						0
					]
				}
			},
			{
				"condition": "query.block_property('bridge:block_rotation') == 3",
				"components": {
					"minecraft:rotation": [
						0,
						0,
						0
					]
				}
			},
			{
				"condition": "query.block_property('bridge:block_rotation') == 4",
				"components": {
					"minecraft:rotation": [
						0,
						270,
						0
					]
				}
			},
			{
				"condition": "query.block_property('bridge:block_rotation') == 5",
				"components": {
					"minecraft:rotation": [
						0,
						90,
						0
					]
				}
			},
			{
				"condition": "query.block_property('hf:active') == 1",
				"components": {
					"minecraft:material_instances": {
						"*": {
							"texture": "curtain_black",
							"render_method": "alpha_test"
						}
					},
					"minecraft:on_interact": {
						"event": "event_1"
					}
				}
			},
			{
				"condition": "query.block_property('hf:active') == 2",
				"components": {
					"minecraft:material_instances": {
						"*": {
							"texture": "curtain_darkblue",
							"render_method": "alpha_test"
						}
					},
					"minecraft:on_interact": {
						"event": "event_2"
					}
				}
			},
			{
				"condition": "query.block_property('hf:active') == 3",
				"components": {
					"minecraft:material_instances": {
						"*": {
							"texture": "curtain_orange",
							"render_method": "alpha_test"
						}
					},
					"minecraft:on_interact": {
						"event": "event_3"
					}
				}
			},
			{
				"condition": "query.block_property('hf:active') == 4",
				"components": {
					"minecraft:material_instances": {
						"*": {
							"texture": "curtain_plumpurple",
							"render_method": "alpha_test"
						}
					},
					"minecraft:on_interact": {
						"event": "event_4"
					}
				}
			},
			{
				"condition": "query.block_property('hf:active') == 5",
				"components": {
					"minecraft:material_instances": {
						"*": {
							"texture": "curtain_white",
							"render_method": "alpha_test"
						}
					},
					"minecraft:on_interact": {
						"event": "event_5"
					}
				}
			},
			{
				"condition": "query.block_property('hf:active') == 6",
				"components": {
					"minecraft:material_instances": {
						"*": {
							"texture": "curtain_yellow",
							"render_method": "alpha_test"
						}
					},
					"minecraft:on_interact": {
						"event": "event_6"
					}
				}
			},
			{
				"condition": "query.block_property('hf:active') == 7",
				"components": {
					"minecraft:material_instances": {
						"*": {
							"texture": "curtain_beige"
						}
					}
				}
			},
			{
				"condition": "query.block_property('hf:movement') == 1",
				"components": {
					"minecraft:geometry": "geometry.curtain_open",
					"minecraft:on_interact": {
						"event": "closesound"
					}
				}
			},
			{
				"condition": "query.block_property('hf:movement') == 2",
				"components": {
					"minecraft:geometry": "geometry.curtain_closed"
				}
			}
		],
		"components": {
			"minecraft:on_player_placing": {
				"event": "bridge:update_rotation"
			},
			"minecraft:destroy_time": 4,
			"minecraft:material_instances": {
				"*": {
					"texture": "curtain_beige",
					"render_method": "alpha_test"
				}
			},
			"minecraft:geometry": "geometry.curtain_closed",
			"minecraft:block_light_absorption": 0,
			"minecraft:creative_category": {
				"group": "itemGroup.name.Items",
				"category": "Items"
			},
			"minecraft:on_interact": {
				"event": "event_0"
			},
			"minecraft:entity_collision": {
				"origin": [
					-8,
					0,
					6
				],
				"size": [
					16,
					16,
					2
				]
			},
			"minecraft:pick_collision": {
				"origin": [
					-8,
					0,
					6
				],
				"size": [
					16,
					16,
					2
				]
			}
		},
		"events": {
			"bridge:update_rotation": {
				"set_block_property": {
					"bridge:block_rotation": "query.cardinal_facing_2d"
				}
			},
			"variant": {
				"set_block_property": {
					"hf:active": 1
				},
				"run_command": {
					"command": [
						"playsound dig.soul_sand @p ~~~ 1 1",
						"particle minecraft:totem_particle ~~~"
					]
				}
			},
			"variant2": {
				"set_block_property": {
					"hf:active": 2
				},
				"run_command": {
					"command": [
						"playsound dig.soul_sand @p ~~~ 1 1",
						"particle minecraft:totem_particle ~~~"
					]
				}
			},
			"variant3": {
				"set_block_property": {
					"hf:active": 3
				},
				"run_command": {
					"command": [
						"playsound dig.soul_sand @p ~~~ 1 1",
						"particle minecraft:totem_particle ~~~"
					]
				}
			},
			"variant4": {
				"set_block_property": {
					"hf:active": 4
				},
				"run_command": {
					"command": [
						"playsound dig.soul_sand @p ~~~ 1 1",
						"particle minecraft:totem_particle ~~~"
					]
				}
			},
			"variant5": {
				"set_block_property": {
					"hf:active": 5
				},
				"run_command": {
					"command": [
						"playsound dig.soul_sand @p ~~~ 1 1",
						"particle minecraft:totem_particle ~~~"
					]
				}
			},
			"variant6": {
				"set_block_property": {
					"hf:active": 6
				},
				"run_command": {
					"command": [
						"playsound dig.soul_sand @p ~~~ 1 1",
						"particle minecraft:totem_particle ~~~"
					]
				}
			},
			"variant7": {
				"set_block_property": {
					"hf:active": 7
				},
				"run_command": {
					"command": [
						"playsound dig.soul_sand @p ~~~ 1 1",
						"particle minecraft:totem_particle ~~~"
					]
				}
			},
			"event_0": {
				"sequence": [
					{
						"trigger": {
							"event": "variant"
						},
						"condition": "query.get_equipped_item_name=='magicpen'"
					},
					{
						"set_block_property": {
							"hf:movement": 1
						},
						"run_command": {
							"command": [
								"playsound land.sand @p ~~1~ 1 1"
							]
						},
						"condition": "query.get_equipped_item_name!='magicpen'"
					}
				]
			},
			"event_1": {
				"sequence": [
					{
						"trigger": {
							"event": "variant2"
						},
						"condition": "query.get_equipped_item_name=='magicpen'"
					},
					{
						"set_block_property": {
							"hf:movement": 1
						},
						"run_command": {
							"command": [
								"playsound land.sand @p ~~1~ 1 1"
							]
						},
						"condition": "query.get_equipped_item_name!='magicpen'"
					}
				]
			},
			"event_2": {
				"sequence": [
					{
						"trigger": {
							"event": "variant3"
						},
						"condition": "query.get_equipped_item_name=='magicpen'"
					},
					{
						"set_block_property": {
							"hf:movement": 1
						},
						"run_command": {
							"command": [
								"playsound land.sand @p ~~1~ 1 1"
							]
						},
						"condition": "query.get_equipped_item_name!='magicpen'"
					}
				]
			},
			"event_3": {
				"sequence": [
					{
						"trigger": {
							"event": "variant4"
						},
						"condition": "query.get_equipped_item_name=='magicpen'"
					},
					{
						"set_block_property": {
							"hf:movement": 1
						},
						"run_command": {
							"command": [
								"playsound land.sand @p ~~1~ 1 1"
							]
						},
						"condition": "query.get_equipped_item_name!='magicpen'"
					}
				]
			},
			"event_4": {
				"sequence": [
					{
						"trigger": {
							"event": "variant5"
						},
						"condition": "query.get_equipped_item_name=='magicpen'"
					},
					{
						"set_block_property": {
							"hf:movement": 1
						},
						"run_command": {
							"command": [
								"playsound land.sand @p ~~1~ 1 1"
							]
						},
						"condition": "query.get_equipped_item_name!='magicpen'"
					}
				]
			},
			"event_5": {
				"sequence": [
					{
						"trigger": {
							"event": "variant6"
						},
						"condition": "query.get_equipped_item_name=='magicpen'"
					},
					{
						"set_block_property": {
							"hf:movement": 1
						},
						"run_command": {
							"command": [
								"playsound land.sand @p ~~1~ 1 1"
							]
						},
						"condition": "query.get_equipped_item_name!='magicpen'"
					}
				]
			},
			"event_6": {
				"sequence": [
					{
						"trigger": {
							"event": "variant7"
						},
						"condition": "query.get_equipped_item_name=='magicpen'"
					},
					{
						"set_block_property": {
							"hf:movement": 1
						},
						"run_command": {
							"command": [
								"playsound land.sand @p ~~1~ 1 1"
							]
						},
						"condition": "query.get_equipped_item_name!='magicpen'"
					}
				]
			},
			"closesound": {
				"set_block_property": {
					"hf:movement": 2
				},
				"run_command": {
					"command": [
						"playsound land.sand @p ~~1~ 1 1"
					]
				}
			}
		}
	},
	"format_version": "1.17.0"
}