Skip to content

Density‐Based Features

Rebby edited this page Oct 30, 2026 · 2 revisions

Large Struct Lib also supports features! You can generate custom terrain as a feature, just remember to only have one instance per chunk! And try to prevent the position from being randomized, although this feature always generates at the lowest corner of the chunk.

Example:

{
  // ID of configured feature
  "type": "largestructlib:density_sampler",
  // whenever the feature replaces non-air blocks. Optional.
  // defaults to false.
  "replace": false
  "config": {
    // Density function you are testing.
    "function": "testing:veins",
    // Samples each density function in order. If the sample returns true then the position generates.
    "samples": [
      {
        // Bounds to sample.
        "minimum": -0.04,
        "maximum": 0.0,
        // Block state provider to place the block in.
        // Check misode & the minecraft wiki for details.
        //
        // Here's an example:
        "state_provider": {
          "type": "minecraft:weighted_state_provider",
          "entries": [
            {
              "weight": 2,
              "data": {
                "Name": "minecraft:azalea_leaves",
                "Properties": {
                  "persistent": "true"
                }
              }
            },
            {
              "weight": 2,
              "data": {
                "Name": "minecraft:flowering_azalea_leaves",
                "Properties": {
                  "persistent": "true"
                }
              }
            },
            {
              "weight": 2,
              "data": {
                "Name": "minecraft:air"
              }
            }
          ]
        }
      }
    ]
  }

}

Clone this wiki locally