{
  "format_version": "1.20.50",
  "minecraft:block": {
    "description": {
      "identifier": "nicothekid:mycelium_sprouts_tall_block",
      "menu_category": {
				"category": "none",
				"group": "none"
			},
			"states": {
				"nicothekid:particles_emission": [
				  0,
				  1
				]
			}
    },
    "components": {
      "minecraft:material_instances": {
        "*": {
          "texture": "nicothekid_mycelium_sprouts_tall_block",
          "render_method": "alpha_test",
          "ambient_occlusion": false,
          "face_dimming": false
        }
      },
      "minecraft:geometry": "geometry.block.nicothekid_cross",
      "minecraft:map_color": "#7B6D73",
      "minecraft:breathability": "air",
      "minecraft:placement_filter": {
        "conditions": [
          {
            "block_filter": [
              {
                "tags": "query.any_tag('myceliumed_stones')"
              },
              {
                "tags": "query.any_tag('myceliumed_woods')"
              },
              "minecraft:mycelium"
            ],
            "allowed_faces": [
              "up"
            ]
          }
        ]
      },
      "minecraft:collision_box": false,
      "minecraft:selection_box": {
        "origin": [ -8, 0, -8 ],
        "size": [ 16, 16, 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.05
      },
      "minecraft:loot": "loot_tables/empty.json",
      "minecraft:on_interact": {
        "event": "nicothekid:mycelium_sprouts_tall_block_interact"
      },
      "minecraft:on_player_destroyed": {
        "event": "nicothekid:mycelium_sprouts_tall_block_destroyed_by_shears",
        "condition": "query.get_equipped_item_name('main_hand') == 'shears'"
      },
      "minecraft:on_placed": {
				"event": "nicothekid:mycelium_sprouts_tall_block_placed"
			},
      "minecraft:random_ticking": {
				"on_tick": {
					"event": "nicothekid:mycelium_sprouts_tall_block_random_change",
					"target": "self"
				}
      },
      
      "tag:mycelium_sprouts": {},
      "tag:custom_plant": {},
      "tag:custom_sprouts": {},
      "tag:plant": {}
    },
    "permutations": [
      {
        "condition": "query.block_state('nicothekid:particles_emission') == 0",
        "components": {
          "minecraft:queued_ticking": {
            "looping": true,
            "interval_range": [ 128, 256 ],
            "on_tick": {
              "event": "nicothekid:mycelium_particles",
              "target": "self"
            }
          }
        }
      },
      {
        "condition": "query.block_state('nicothekid:particles_emission') == 1",
        "components": {
          "minecraft:queued_ticking": {
            "looping": true,
            "interval_range": [ 128, 256 ],
            "on_tick": {
              "event": "nicothekid:mycelium_particles",
              "target": "self"
            }
          }
        }
      }
    ],
    "events": {
      "nicothekid:mycelium_sprouts_tall_block_interact": {
				"sequence": [
					{
						"condition": "query.get_equipped_item_name('main_hand') == 'glowcelium_bone_meal'",
						"trigger": {
							"event": "nicothekid:mycelium_sprouts_tall_block_interact_glowcelium_bone_meal",
							"target": "self"
						}
					}
				]
			},
			"nicothekid:mycelium_sprouts_tall_block_interact_glowcelium_bone_meal": {
				"sequence": [
					{
						"decrement_stack": {}
					},
					{
						"run_command": {
							"command": [
							  "playsound item.bone_meal.use @a[r=10]",
								"particle minecraft:crop_growth_emitter ~~~"
							]
						}
					},
					{
						"trigger": {
							"event": "nicothekid:mycelium_sprouts_tall_block_change"
						}
					}
				]
			},
      "nicothekid:mycelium_sprouts_tall_block_change": {
        "randomize": [
          {
            "weight": 1
          },
          {
            "weight": 100,
            "set_block": {
              "block_type": "nicothekid:glowcelium_sprouts_tall_block"
            }
          }
        ]
      },
      "nicothekid:mycelium_sprouts_tall_block_destroyed_by_shears": {
				"sequence": [
					{
						"spawn_loot": {
							"table": "loot_tables/nicos_cave_expansion/blocks/nicothekid_mycelium_sprouts_tall.json"
						}
					}
				]
			},
			"nicothekid:mycelium_particles": {
				"sequence": [
					{
						"run_command": {
							"command": [
								"particle nicothekid:mycelium_particle ~ ~ ~"
							]
						}
					}
				]
      },
      "nicothekid:mycelium_sprouts_tall_block_placed": {
        "sequence": [
					{
						"run_command": {
							"command": [
								"particle nicothekid:mycelium_particle ~ ~ ~"
							]
						}
					},
					{
						"set_block_state": {
							"nicothekid:particles_emission": 0
						}
					}
				]
      },
      "nicothekid:mycelium_sprouts_tall_block_random_change": {
        "sequence": [
					{
						"run_command": {
							"command": [
								"particle nicothekid:mycelium_particle ~ ~ ~"
							]
						}
					},
					{
						"set_block_state": {
							"nicothekid:particles_emission": 1
						}
					}
				]
      }
    }
  }
}
