Skip to content

Tree Packs: Soil Properties

Max Hyper edited this page Nov 27, 2023 · 7 revisions

What is it

The soil_properties folder contains JSON files that define the properties of leaves. When a tree is planted, the block it was planted on will turn into a rooty version of itself to control the tree. In turn, defining these properties defines what blocks trees are allowed to be planted on.

Soil categories

Soil categories are short strings in the format of dirt_like, sand_like, etc. That define a coherent group of soils a tree can be planted on. These categories are created when a Soil Properties file contains them, and any species can use them, even between addons. Important: These are not block tags, fields that require a soil category do not accept block tags, and viceversa.

Properties

The following properties MUST be included:

  • "primitive_soil": The block the soil is made of. It will turn back into it when the tree is removed
  • "acceptable_soils": The list of soil categories that this rooty soil belongs to. (not block tags)

The following properties can be included:

  • "type": Allows for custom behavior beyond these properties. The options are {water, spreadable}. More can be added by addons. (Default is none)
  • "substitute_soil": Another soil properties, when a tree is planted on this primitive soil the block will turn into its substitute soil instead, and this one will not have its own rooty block. Example: farmland turns to rooty dirt when a tree is planted on it, so there is no rooty farmland block. (Default: not set)
  • "block_registry_name": The registry name of the block (By default it uses "rooty_" + the name of the file)

The following properties are only applicable dynamictrees:spreadable type soil properties

  • "required_light": Minimum light for the soil to to be spread on
  • "spread_item": Item used to spread soil
  • "spreadable_soils": The acceptable blocks the soil can spread from