{
  "format_version": "1.20.50",
  "minecraft:block": {
    "description": {
      "identifier": "nicothekid:mossy_wood_stripped",
      "menu_category": {
				"category": "nature",
				"group": "itemGroup.name.wood"
			},
			"states": {
				"nicothekid:rotation": [
					0,
					1,
					2
				],
				"nicothekid:mossy_wood_back": [
				  0,
				  1
				]
			}
    },
    "components": {
      "minecraft:material_instances": {
        "*": {
          "texture": "nicothekid_mossy_wood_stripped",
          "render_method": "opaque",
          "ambient_occlusion": true,
          "face_dimming": true
        },
        "up": {
          "texture": "nicothekid_mossy_wood_stripped",
          "render_method": "opaque",
          "ambient_occlusion": true,
          "face_dimming": true
        },
        "down": {
          "texture": "nicothekid_mossy_wood_stripped",
          "render_method": "opaque",
          "ambient_occlusion": true,
          "face_dimming": true
        }
      },
      "minecraft:map_color": "#70922D",
      "minecraft:breathability": "solid",
      "minecraft:unit_cube": {},
      "minecraft:light_dampening": 15,
      "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.5
      },
      "minecraft:loot": "loot_tables/mythical_biomes/blocks/nicothekid_mossy_wood_stripped.json",
      "minecraft:on_interact": {
        "event": "nicothekid:mossy_wood_stripped_interact_bone_meal",
        "condition": "query.get_equipped_item_name('main_hand') == 'bone_meal'"
	   },
      "minecraft:on_player_placing": {
				"event": "nicothekid:place_rotation"
			},
      "minecraft:transformation": {
        "rotation": [ 0, 0, 0 ]
      },
      
      "tag:mossy_wood_stripped": {},
      "tag:custom_stripped_wood": {},
      "tag:wood": {},
      "tag:solid_block": {}
    },
    "permutations": [
      {
				"condition": "query.block_state('nicothekid:rotation') == 0",
				"components": {
					"minecraft:transformation": {
            "rotation": [ 0, 0, 0 ]
          }
				}
			},
			{
				"condition": "query.block_state('nicothekid:rotation') == 1",
				"components": {
					"minecraft:transformation": {
            "rotation": [ 90, 0, 0 ]
          }
				}
			},
			{
				"condition": "query.block_state('nicothekid:rotation') == 2",
				"components": {
					"minecraft:transformation": {
            "rotation": [ 0, 0, 90 ]
          }
				}
			},
      {
				"condition": "query.block_state('nicothekid:mossy_wood_back') == 0",
				"components": {
					"minecraft:material_instances": {
						"*": {
							"texture": "nicothekid_mossy_wood_stripped",
							"render_method": "opaque",
							"ambient_occlusion": true,
							"face_dimming": true
						},
						"up": {
							"texture": "nicothekid_mossy_wood_stripped",
							"render_method": "opaque",
							"ambient_occlusion": true,
							"face_dimming": true
						},
						"down": {
							"texture": "nicothekid_mossy_wood_stripped",
							"render_method": "opaque",
							"ambient_occlusion": true,
							"face_dimming": true
						}
					},
					"minecraft:on_interact": {
					  "event": "nicothekid:mossy_wood_stripped_interact_bone_meal",
					  "condition": "query.get_equipped_item_name('main_hand') == 'bone_meal'"
					},
					"minecraft:loot": "loot_tables/mythical_biomes/blocks/nicothekid_mossy_wood_stripped.json"
				}
			},
      {
				"condition": "query.block_state('nicothekid:mossy_wood_back') == 1",
				"components": {
					"minecraft:material_instances": {
						"*": {
							"texture": "nicothekid_mossy_wood",
							"render_method": "opaque",
							"ambient_occlusion": true,
							"face_dimming": true
						},
						"up": {
							"texture": "nicothekid_mossy_wood",
							"render_method": "opaque",
							"ambient_occlusion": true,
							"face_dimming": true
						},
						"down": {
							"texture": "nicothekid_mossy_wood",
							"render_method": "opaque",
							"ambient_occlusion": true,
							"face_dimming": true
						}
					},
					"minecraft:on_interact": {
					  "event": "nicothekid:mossy_wood_interact_axe",
					  "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'minecraft:is_axe')",
					  "target": "self"
					},
					"minecraft:loot": "loot_tables/mythical_biomes/blocks/nicothekid_mossy_wood.json"
				}
			}
    ],
    "events": {
      "nicothekid:mossy_wood_stripped_interact_bone_meal": {
        "sequence": [
					{
						"decrement_stack": {}
					},
					{
						"set_block_state": {
							"nicothekid:mossy_wood_back": 1
						}
					},
					{
						"run_command": {
							"command": [
							  "playsound item.bone_meal.use @a[r=10]",
								"particle minecraft:crop_growth_emitter ~~~"
							]
						}
					}
				]
      },
      "nicothekid:mossy_wood_interact_axe": {
        "sequence": [
          {
            "set_block_state": {
              "nicothekid:mossy_wood_back": 0
            }
          },
          {
						"run_command": {
							"command": [
								"playsound use.wood @a[r=10]"
							]
						}
					},
          {
            "damage": {
              "type": "durability",
              "target": "item",
              "amount": 1
            }
          }
        ]
      },
      "nicothekid:place_rotation": {
				"set_block_state": {
					"nicothekid:rotation": "math.floor(query.cardinal_block_face_placed_on/2)"
				}
			}
    }
  }
}
