Wiki 9Minecraft Falling Leaves Mod Wiki

Falling Leaves Mod — Guide

Mechanics

The mod operates through a specialized particle engine that monitors leaf blocks in the player's vicinity.

Particle Spawning

Particles are generated from the underside of leaf blocks. For a particle to spawn, the mod checks for a minimum amount of free space (air) directly beneath the block. This prevents leaves from spawning inside other blocks or in cramped spaces.

Physics and Behavior

  • Wind Effects: Particles do not fall in a perfectly straight line. They are influenced by a global wind system that causes them to drift horizontally as they descend.
  • Surface Collision: When a leaf particle hits a solid block or a water source, it stops its descent and rests on the surface. This adds a layer of realism as forest floors appear to accumulate fallen foliage.
  • Lifespan: Each particle has a defined lifespan. Once this timer expires, the particle fades away to maintain performance and prevent visual clutter.

Close-up of leaf particles resting on the ground

Customization and Resource Packs

The mod allows for extensive customization of specific leaf blocks through resource packs and datapacks. This is useful for adding support for other mods or changing the look of vanilla leaves.

Modern Customization (Version 2.x.x+)

To change settings for a specific leaf block, create a JSON file at: assets/<modid>/fallingleaves/settings/<blockid>.json

Example JSON Content:

{
 "spawnrate": 1.5,
 "leaf_type": "fallingleaves:default",
 "consider_as_conifer": false
}

Creating Custom Leaf Types

Leaf types define which textures are used for particles. You can create a new type by placing a JSON file at: assets/<modid>/fallingleaves/leaftypes/<type>.json

Example JSON Content:

{
 "textures": [
 "minecraft:particle/falling_leaf_1",
 "minecraft:particle/falling_leaf_2"
 ]
}

Legacy Customization (Version 1.x.x)

For older versions, the mod uses a datapack-style system located at: data/<modid>/fallingleaves/<blockid>.json

Example JSON Content:

{
 "spawnrate": 1.0,
 "isConifer": true
}