{
	"format_version": "1.20.30",
	"minecraft:block": {
		"description": {
			"identifier": "farmersdelight:sweet_berry_cheesecake_block",
			"states": {
				"block:slice": [
					4,
					3,
					2,
					1,
					0
				],
				"block:rotation": [
					2,
					3,
					4,
					5
				]
			}
		},
		"components": {
			"minecraft:material_instances": {
				"*": {
					"render_method": "alpha_test",
					"texture": "sweet_berry_cheesecake"
				}
			},
			"minecraft:destructible_by_mining": {
				"seconds_to_destroy": 0.5
			},
			"minecraft:on_interact": {
				"event": "slice"
			},
			"minecraft:collision_box": {
				"origin": [
					-6,
					0,
					-6
				],
				"size": [
					12,
					4,
					12
				]
			},
			"minecraft:selection_box": {
				"origin": [
					-6,
					0,
					-6
				],
				"size": [
					12,
					4,
					12
				]
			},
			"minecraft:on_player_placing": {
				"event": "block:rotation"
			},
			"minecraft:loot": "loot_tables/empty.json"
		},
		"events": {
			"slice": {
				"sequence": [
					{
						"set_block_state": {
							"block:slice": "query.block_state('block:slice') - 1"
						}
					},
					{
						"run_command": {
							"command": [
								"playsound random.eat @a[r=6]",
								"effect @s saturation 3 0 true",
								"effect @s speed 30 0 false"
							],
							"target": "other"
						}
					},
					{
						"condition": "query.block_state('block:slice')==1",
						"set_block": {
							"block_type": "minecraft:air"
						}
					}
				]
			},
			"block:rotation": {
				"set_block_state": {
					"block:rotation": "query.cardinal_facing_2d",
					"block:slice": 4
				}
			}
		},
		"permutations": [
			{
				"condition": "query.block_state('block:rotation') == 2",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							0,
							0
						]
					}
				}
			},
			{
				"condition": "query.block_state('block:rotation') == 3",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							-180,
							0
						]
					}
				}
			},
			{
				"condition": "query.block_state('block:rotation') == 4",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							90,
							0
						]
					}
				}
			},
			{
				"condition": "query.block_state('block:rotation') == 5",
				"components": {
					"minecraft:transformation": {
						"rotation": [
							0,
							-90,
							0
						]
					}
				}
			},
			{
				"condition": "query.block_state('block:slice') == 4",
				"components": {
					"minecraft:geometry": "geometry.pie4"
				}
			},
			{
				"condition": "query.block_state('block:slice') == 3",
				"components": {
					"minecraft:geometry": "geometry.pie3"
				}
			},
			{
				"condition": "query.block_state('block:slice') == 2",
				"components": {
					"minecraft:geometry": "geometry.pie2"
				}
			},
			{
				"condition": "query.block_state('block:slice') == 1",
				"components": {
					"minecraft:geometry": "geometry.pie1"
				}
			}
		]
	}
}