Skip to content

Tree Packs: World Generation

supermassimo edited this page Apr 4, 2023 · 13 revisions

What is it

The world_gen folder should contain two files. default.json handles the generation of dynamic trees for each biome in the terrain, while feature_cancellers.json handles applying cancellers, which disable existing generation of non-dynamic features such as trees, mushrooms, nether fungi, or similar.

Biome Selectors

Species Selectors

Density Functions

Cancellers

Feature cancellers detect and cancel features that generate in some specific way. Some mods take their own approach to generation, and thus a custom canceller might be needed to successfully remove the features from the world.

However these should cover the cases where vanilla features are used, or ones that imitate them in implementation.

By default, the cancellers provided by Dynamic Trees are {tree, rooted_tree, mushroom, fungus}. More can be added by other addons. Dynamic Trees Plus adds {dynamictreesplus:cactus} to cancel cacti.

default.json

This file contains an array of elements, each handling a case of biomes where Dynamic Trees will be generated.

  • "select": The biomes selected to apply these cancellers to. Must be a valid [biome selector]
  • "apply": An object, or an array of objects with the properties species, density and chance.
    • "species": A single species or a species selector.
    • "density": A number or a function to configure the radii of the trees that generate. A higher density means smaller trees more packed together, a lower density produces larger trees spaced apart more.
    • "chance": A number between 0 and 1 that defines the chance for a tree to generate on each valid spot.

feature_cancellers.json

This file contains an array of elements, each handling a case where cancellers should be applied. Every element must have these properties:

  • "select": The biomes selected to apply these cancellers to. Must be a valid biome selector.
  • "cancellers": An object, or an array of objects with the properties type and namespace.
    • "type": The canceller itself, must be an option from an existing registered canceller.
    • "namespace": The namespace of the feature, vanilla features use minecraft.