Skip to content

Plant Growth

NorthWestTrees edited this page Aug 11, 2024 · 2 revisions

πŸ’¬ OVERVIEW

Grass blocks have advanced mechanics that allow tall grass and other plants to grow every 1,200 game ticks, equivalent to 1 real-time minute.

πŸ“š HOW IT WORKS

SPACE CHECKING

The block first checks how many blocks are within a 5x5x5 area around the block where the plant will grow. Each plant is then counted and stored in memory for a later test.

DENSITY

The next step is to check for the biome density tag. Each biome can be assigned a density tag that defines the maximum number of plants that can be generated within it.

  • Dense = 12
  • Moderate = 6
  • Light = 3

BIOME CHECKING

The next step is to determine if the biome is a specific type, which will decide whether the default foliage is used or if a custom block tag will be applied for generation.

GENERATION

The final task is to have the block randomly select and place a block from the designated block tag. The blocks in this tag should be prioritized under the space-checking block tags to prevent overpopulation of the biomes.

🏷 TAGS

SPACE CHECK TAGS

Tag type Tag namespace Tag path
Block tale_of_biomes grass_blocks
Block tale_of_biomes grass_plants

DENSITY TAGS

Tag type Tag namespace Tag path
Biome tale_of_biomes grass_growth/dense
Biome tale_of_biomes grass_growth/moderate
Biome tale_of_biomes grass_growth/light

SELECTION TAGS

Tag type Tag namespace Tag path
Biome tale_of_biomes eldenmoor/flower_plains

BLOCK GENERATION TAGS

Tag type Tag namespace Tag path
Block tale_of_biomes grass_growth/flower_plains
Block tale_of_biomes grass_growth/defualt

πŸ§ͺ Future Plans

In the future, I plan to expand this feature to support cross-mod integration, allowing other mods to utilize it through commands and configuration settings.

WIKI

πŸ§ͺ DEVELOPMENT

πŸ“œ DOCUMENTS

🐞 ISSUE TRACKER

πŸ”— MOD PAGES

Clone this wiki locally