{
  "format_version": "1.20.50",
  "minecraft:block": {
    "description": {
      "identifier": "nicothekid:mossy_slab",
      "menu_category": {
				"category": "construction",
				"group": "itemGroup.name.slab"
			},
      "states": {
				"nicothekid:slab_position": [
					0,
					1
				]
			}
    },
    "components": {
      "minecraft:material_instances": {
        "*": {
          "texture": "nicothekid_mossy_slab",
          "render_method": "opaque",
          "ambient_occlusion": true,
					"face_dimming": true
        }
      },
      "minecraft:geometry": "geometry.block.nicothekid_slab_up",
      "minecraft:map_color": "#4F463E",
      "minecraft:breathability": "air",
      "minecraft:collision_box": {
				"origin": [ -8, 0, -8 ],
				"size": [ 16, 8, 16 ]
			},
			"minecraft:selection_box": {
				"origin": [ -8, 0, -8 ],
				"size": [ 16, 8, 16 ]
			},
      "minecraft:light_dampening": 0,
      "minecraft:light_emission": 0,
      "minecraft:friction": 0.4,
      "minecraft:flammable": {
        "catch_chance_modifier": 5,
        "destroy_chance_modifier": 20
      },
      "minecraft:destructible_by_explosion": true,
      "minecraft:destructible_by_mining": {
        "seconds_to_destroy": 0.2
      },
      "minecraft:loot": "loot_tables/mythical_biomes/blocks/nicothekid_mossy_slab.json",
			"minecraft:on_player_placing": {
				"event": "nicothekid:place_direction"
			},
      
      "tag:mossy_slab": {},
      "tag:wooden_slab": {},
      "tag:custom_slab": {},
      "tag:wood": {}
    },
    "permutations": [
			{
				"condition": "query.block_state('nicothekid:slab_position') == 0",
				"components": {
				  "minecraft:geometry": "geometry.block.nicothekid_slab_down",
					"minecraft:collision_box": {
						"origin": [ -8, 0, -8 ],
						"size": [ 16, 8, 16 ]
					},
					"minecraft:selection_box": {
						"origin": [ -8, 0, -8 ],
						"size": [ 16, 8, 16 ]
					}
				}
			},
			{
				"condition": "query.block_state('nicothekid:slab_position') == 1",
				"components": {
				  "minecraft:geometry": "geometry.block.nicothekid_slab_up",
					"minecraft:collision_box": {
						"origin": [ -8, 8, -8 ],
						"size": [ 16, 8, 16 ]
					},
					"minecraft:selection_box": {
						"origin": [ -8, 8, -8 ],
						"size": [ 16, 8, 16 ]
					}
				}
			}
		],
		"events": {
			"nicothekid:place_direction": {
				"sequence": [
					{
						"condition": "query.target_x_rotation>=0",
						"set_block_state": {
							"nicothekid:slab_position": 0
						}
					},
					{
						"condition": "query.target_x_rotation<=0",
						"set_block_state": {
							"nicothekid:slab_position": 1
						}
					}
				]
			}
		}
  }
}
