//bridge-file-version: #29
{
	"minecraft:block": {
		"description": {
			"properties": {
				"bridge:block_rotation": [
					2,
					3,
					4,
					5
				],
				"hf:print": [
					0,
					1,
					2,
					3,
					4,
					5,
					6,
					7,
					8
				]
			},
			"identifier": "hf:printer"
		},
		"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:print') == 1",
				"components": {
					"minecraft:geometry": "geometry.printer_1",
					"minecraft:ticking": {
						"on_tick": {
							"event": "one"
						},
						"range": [
							0.1,
							0.1
						],
						"looping": false
					},
					"minecraft:material_instances": {
						"*": {
							"render_method": "alpha_test",
							"texture": "printer"
						}
					}
				}
			},
			{
				"condition": "query.block_property('hf:print') == 2",
				"components": {
					"minecraft:geometry": "geometry.printer_2",
					"minecraft:ticking": {
						"on_tick": {
							"event": "two"
						},
						"range": [
							0.1,
							0.1
						],
						"looping": false
					},
					"minecraft:material_instances": {
						"*": {
							"render_method": "alpha_test",
							"texture": "printer"
						}
					}
				}
			},
			{
				"condition": "query.block_property('hf:print') == 3",
				"components": {
					"minecraft:geometry": "geometry.printer_3",
					"minecraft:ticking": {
						"on_tick": {
							"event": "three"
						},
						"range": [
							0.1,
							0.1
						],
						"looping": false
					},
					"minecraft:material_instances": {
						"*": {
							"render_method": "alpha_test",
							"texture": "printer"
						}
					}
				}
			},
			{
				"condition": "query.block_property('hf:print') == 4",
				"components": {
					"minecraft:geometry": "geometry.printer_4",
					"minecraft:ticking": {
						"on_tick": {
							"event": "four"
						},
						"range": [
							0.1,
							0.1
						],
						"looping": false
					},
					"minecraft:material_instances": {
						"*": {
							"render_method": "alpha_test",
							"texture": "printer"
						}
					}
				}
			},
			{
				"condition": "query.block_property('hf:print') == 5",
				"components": {
					"minecraft:geometry": "geometry.printer_5",
					"minecraft:ticking": {
						"on_tick": {
							"event": "five"
						},
						"range": [
							0.1,
							0.1
						],
						"looping": false
					},
					"minecraft:material_instances": {
						"*": {
							"render_method": "alpha_test",
							"texture": "printer"
						}
					}
				}
			},
			{
				"condition": "query.block_property('hf:print') == 6",
				"components": {
					"minecraft:geometry": "geometry.printer_6",
					"minecraft:ticking": {
						"on_tick": {
							"event": "six"
						},
						"range": [
							0.1,
							0.1
						],
						"looping": false
					},
					"minecraft:material_instances": {
						"*": {
							"render_method": "alpha_test",
							"texture": "printer"
						}
					}
				}
			},
			{
				"condition": "query.block_property('hf:print') == 7",
				"components": {
					"minecraft:geometry": "geometry.printer_7",
					"minecraft:material_instances": {
						"*": {
							"render_method": "alpha_test",
							"texture": "printer"
						}
					},
					"minecraft:on_interact": {
						"event": "finish"
					}
				}
			},
			{
				"condition": "query.block_property('hf:print') == 8",
				"components": {
					"minecraft:geometry": "geometry.printer"
				}
			}
		],
		"components": {
			"minecraft:on_player_placing": {
				"event": "bridge:update_rotation"
			},
			"minecraft:destroy_time": 4,
			"minecraft:entity_collision": {
				"origin": [
					-7,
					0,
					-7
				],
				"size": [
					14,
					7,
					12
				]
			},
			"minecraft:pick_collision": {
				"origin": [
					-7,
					0,
					-7
				],
				"size": [
					14,
					7,
					12
				]
			},
			"minecraft:material_instances": {
				"*": {
					"texture": "printer",
					"render_method": "alpha_test"
				}
			},
			"minecraft:geometry": "geometry.printer",
			"minecraft:block_light_absorption": 0,
			"minecraft:creative_category": {
				"group": "itemGroup.name.Items",
				"category": "Items"
			},
			"minecraft:on_interact": {
				"event": "start"
			}
		},
		"events": {
			"bridge:update_rotation": {
				"set_block_property": {
					"bridge:block_rotation": "query.cardinal_facing_2d"
				}
			},
			"start": {
				"set_block_property": {
					"hf:print": 1
				}
			},
			"one": {
				"set_block_property": {
					"hf:print": 2
				}
			},
			"two": {
				"set_block_property": {
					"hf:print": 3
				}
			},
			"three": {
				"set_block_property": {
					"hf:print": 4
				}
			},
			"four": {
				"set_block_property": {
					"hf:print": 5
				}
			},
			"five": {
				"set_block_property": {
					"hf:print": 6
				}
			},
			"six": {
				"set_block_property": {
					"hf:print": 7
				}
			},
			"finish": {
				"set_block_property": {
					"hf:print": 8
				},
				"spawn_loot": {
					"table": "loot_tables/entities/paper.json"
				},
				"run_command": {
					"command": [
						"playsound random.pop @p ~~~ 1 1"
					]
				}
			}
		}
	},
	"format_version": "1.17.0"
}