{
  "format_version": "1.13.0",
  "minecraft:tree_feature": {
    "description": {
      "identifier": "minecraft:swamp_tree_feature"
    },
    "trunk": {
      "trunk_height": {
        "range_min": 5,
        "range_max": 9
      },
      "trunk_block": {
        "name": "minecraft:oak_log"
      },
      "can_be_submerged": {
        "max_depth": 2
      }
    },
    "canopy": {
      "canopy_offset": {
        "min": -3,
        "max": 0
      },
      "variation_chance": [
        {
          "numerator": 1,
          "denominator": 2
        },
        {
          "numerator": 1,
          "denominator": 2
        },
        {
          "numerator": 1,
          "denominator": 2
        },
        {
          "numerator": 1,
          "denominator": 1
        }
      ],
      "min_width": 2,
      "leaf_block": {
        "name": "minecraft:oak_leaves"
      },
      "canopy_decoration": {
        "decoration_block": "minecraft:vine",
        "decoration_chance": {
          "numerator": 1,
          "denominator": 4
        },
        "num_steps": 4,
        "step_direction": "down"
      }
    },
    // Blocks the tree can be placed on.
    "may_grow_on": [
      { "tags": "query.any_tag('dirt')" }
    ],
    // Any "may_grow_on" block that is not specified here will be replaced with the first block in this list.
    "base_block": [
      "minecraft:dirt",
      "minecraft:coarse_dirt"
    ],
    // Unlike other trees, we avoid adding "query.any_tag('dirt')" to "may_grow_through" because, combined with "can_be_submerged", it would cause the trunk to start underground.
    // "may_grow_through": [],
    // Blocks that can be replaced by the tree's trunk and canopy.
    "may_replace": [
      "minecraft:air",
      "minecraft:snow_layer",
      // All leaves
      "minecraft:acacia_leaves",
      "minecraft:cherry_leaves",
      "minecraft:dark_oak_leaves",
      "minecraft:jungle_leaves",
      "minecraft:mangrove_leaves",
      "minecraft:oak_leaves",
      "minecraft:pale_oak_leaves",
      "minecraft:spruce_leaves",
      // Water
      "minecraft:water",
      "minecraft:flowing_water",
      // Plants
      "minecraft:wildflowers",
      "minecraft:leaf_litter"
    ]
  }
}
