How to make a Feature

Section

What is a feature?

Features are small block compositions generated in each chunk after terrain generation in the world, like vanilla pumpkin patches or ice spikes, and can be generated in all dimensions. 

Usually, for performance reasons, are not big as structures, but the size can be fully customized (generating over more than one chunk is not advised, though) and can be restricted to one specific biome or dimension. Ore generation also uses features normally.

Minecraft feature vs structure

Minecraft has two worldgen block composition types: structure and feature. The question is, when to use which?

Use feature when:

  • your block composition is smaller than 16x16 in width and depth
  • you want your block composition to appear multiple times in the chunk
  • you need specific placement parameters that allow one to place the block composition in certain levels, over specific blocks, with specific distribution, etc.

Use structure when:

  • your block composition is larger than 16x16 in width and depth, meaning it spans over more than one chunk
  • you need to be able to locate the block composition using the Minecraft locate command
  • you need the block composition to adapt to the terrain
  • you are ok with block composition appearing at most once per chunk
  • you are ok with a limited set of options the vanilla Minecraft structure configuration offers
  • you want the block composition to be stored in the chunk data

Sometimes there will be an overlap of the needs. In this case, decide on the one offering you more of the options you need for your use case.

Examples of structure use cases: larger dungeons, houses, villages, big ship structures, etc.

Examples of feature use cases: custom tree, plant, a small blob of blocks, small underground modifications, small loot dungeons, etc.

Creation and naming

  • First, go to the workspace.
  • Next, click on Create new element.
  • Select the feature element.
  • Type the name of your feature. Names must not be repeated! The end-user will not see this name, so name it's something that you can identify. One way you can prevent your feature name from being repeated is to put the mod type before your mod name, for example, FeatureAmazingTree or FeatureBoringGrass.
  • Click next.

Feature settings

You have a few feature settings at the top of the feature editor.

  • Generation stage:
  • This option determines at what stage of world generation the feature should be added. Remember that despite the name these options will NOT control how your feature will be generated but when the world will place it. Two features that generate in the same place but with different placement orders might override each other so choose well which parameter you want to use. In order of generation:                                                                 
    • raw_generation: the feature generates without a specific placement almost at the beginning of the world, like the small end islands.
    • lakes: the feature will generate on the world surface like lava lakes.
    • local_modification: the feature will generate in specific locations like geodes and icebergs.
    • underground_structure: the feature will generate underground like dungeons and mineshafts. Note: use this parameter only if said structure is smaller than a 16x16.
    • surface_structure: same as above but the structure will generate on the surface.
    • stronghold: the old stronghold generation preset (strongholds now use surface_structure).
    • underground_ores: the feature will works like a normal Minecraft ore. Note: you might want to use the default block generation in the block mod element unless you want to specify more conditions or use vanilla blocks.
    • underground_decoration: same as above. Used by blackstone and gravel blobs in the Nether.
    • fluid_springs: the feature will generate a single block exposed on a single side generating a waterfall like structure. Note: this feature is only for fluids, using normal blocks will be mostly useless.
    • vegetal_decoration: used to generate plants around the world like reeds, trees and cacti. 
    • top_layer_modification: used by block that can generate on top of the biome, like snow layers in cold biomes.
  • Restricted dimensions:
    • Use this field to define dimensions where the spawning should happen.
    • If the list is empty, no dimension restriction will be set and spawning will occur in all dimensions.
  • Restricted biomes
    • Use this field to define biomes, where the spawning should happen.
    • If the list is empty, no biome restriction will be set and spawning will occur in all biomes.
  • Additional generation condition
    • Add a procedure with logic return value to have more conditions for generating this feature.
    • This condition is checked AFTER the placement modifiers in the feature builder.
    • Keep in mind some procedure blocks might not work correctly in this trigger during early world generation.

Configured features

Configured features are the main blocks that will define the block shape and block types of your feature. There are several options you can use for configured features. You can find these blocks under the Features tab in the editor.

NBT structure file-based features

In case you want to place NBT files (generated using e.g. structure block) as a feature and not as a structure for any of the reasons mentioned in the "structure vs feature" section above, you can use the "Custom structure" feature block for that. Below you can see two examples of configurations to help you get started.

Surface/on-the-ground structure with "block at" condition

Surface/on-the-ground structure with "block at" condition

Feature configuration explanation:

  • The NBT structure file named bobblestone_boulder_1 will be placed
  • No offset will be applied to the planned placement location
  • NBT structure will not be rotated or mirrored
  • Structure blocks and air blocks present in the NBT structure will not be placed

Placement configuration explanation:

  • The NBT structure feature will be placed every 10 chunks, given other conditions pass
  • It will be placed 2 to 10 times per chunk if the previous condition passes for a given chunk
  • Random X and Z offsets will be applied to the placement in the chunk
  • The feature will be placed on the ground when the first non-air block is found starting from the sky down
  • The feature will only be placed if, below the position of the feature, one of the two listed blocks is present
  • The feature will only be placed if the biome condition passes

Underground structure

Underground structure

Feature configuration explanation:

  • The NBT structure file named underground_house will be placed
  • No offset will be applied to the planned placement location in the x and z directions, but the feature will be placed 18 blocks below the initially planned location
  • NBT structure will be rotated and mirrored
  • Structure blocks present in the NBT structure will not be placed

Placement configuration explanation:

  • The NBT structure feature will be placed every 10 chunks, given other conditions pass
  • Random X and Z offsets will be applied to the placement in the chunk
  • The feature will be uniformly spread between heights of 8 blocks above the bottom of the world and the height of 128
  • Additionally the height needs to be between -192 and -8 for the feature to be placed
  • The feature will only be placed if the biome condition passes

Math and blocks

Some blocks support blocks and math settings, you can select math blocks under Integer providers and blocks under the blocks tabs. The blocks will only work with the same color of block in your placement or feature blocks tabs.

Placements

While features give you options of things to work with placements allow you to control where and how they are placed.

Placement block ordering

The most common placements should look like this in order: 

Tier 1 - The "With a chance" (if only some chunks have this feature) or "Repeated x times" (if the feature generates more than once in a chunk) 

Tier 1 blocks

Tier 2 - The "With random XZ" placement 

Tier 2 example

Tier 3 - One of the height placements ("On heightmap", etc.)

Tier 3 example

Tier 4 - Additional conditions if needed (for example if the feature should only generate on a solid block etc.)

Tier 4 example

Tier 5 - The "Only if biome has this feature", so that the feature doesn't generate in bordering biomes

Tier 5 example

Templates and imports

You can also use built-in templates under the Feature Templates tab. If you are not sure how to use the feature mod element to correctly place e.g. tree or NBT file at the desired locations in the world, we recommend checking out the "Feature templates" button that provides you demo placements and features with explanatory comments included.

Feature mod element templates

You can also export and import your feature structure to a feature file and use it in other workspaces.

Video tutorial

If you prefer to watch the video, you can find the wiki page above summarized in a video:



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.