//bridge-file-version: #12
{
	"format_version": "1.17.0",
	"minecraft:block": {
		"description": {
			"identifier": "strat:seared_melter",
			"properties": {
				"bridge:block_rotation": [
					2,
					3,
					4,
					5
				]
			}
		},
		"components": {
			"minecraft:on_player_placing": {
				"event": "bridge:update_rotation"
			},
			"minecraft:destroy_time": 2,
			"minecraft:explosion_resistance": 10,
			"minecraft:material_instances": {
				"*": {
					"texture": "seared_melter",
					"render_method": "alpha_test"
				}
			},
			"minecraft:geometry": "geometry.melter",
			"minecraft:creative_category": {
				"group": "itemGroup.name.Items",
				"category": "Items"
			},
			"minecraft:block_light_emission": 0,
			"minecraft:ticking": {
				"looping": true,
				"range": [
					1,
					1
				],
				"on_tick": {
					"event": "strat:change_block"
				}
			},
			"minecraft:loot": "loot_tables/seared_melter.json",
			"tag:stone": {}
		},
		"events": {
			"bridge:update_rotation": {
				"sequence": [
					{
						"set_block_property": {
							"bridge:block_rotation": "query.cardinal_facing_2d"
						}
					},
					{
						"trigger": {
							"event": "strat:change_block"
						}
					}
				]
			},
			"strat:change_block": {
				"sequence": [
					{
						"condition": "query.block_property('bridge:block_rotation') == 2",
						"set_block": {
							"block_type": "strat:seared_melter_180"
						}
					},
					{
						"condition": "query.block_property('bridge:block_rotation') == 3",
						"set_block": {
							"block_type": "strat:seared_melter_0"
						}
					},
					{
						"condition": "query.block_property('bridge:block_rotation') == 4",
						"set_block": {
							"block_type": "strat:seared_melter_270"
						}
					},
					{
						"condition": "query.block_property('bridge:block_rotation') == 5",
						"set_block": {
							"block_type": "strat:seared_melter_90"
						}
					}
				]
			}
		},
		"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
					]
				}
			}
		]
	}
}