Skip to content

Resource Pack Integration

kynake edited this page Nov 16, 2026 · 3 revisions

Many of the mod's features can receive additional functionality via resource packs. New textures for certain features can be added without having to overwrite already existing ones and additional support for blocks and biomes can also be added.


For information about Block Filters check this wiki page.
For information about Biome Filters check this wiki page.


Block and Biome Filters

Filters for blocks and biomes can be included by resource packs or mods to offer default compatibility with Better Foliage - Legacy Edition. These filters work exactly the same as the ones in the player's config file, and the filter entries included will be 'stacked' in order of priority. The filters for each different block or biome will be aggregated from the files in the following paths:

Biomes

  • Path: assets/betterfoliage/
    • Biomes where algae can appear: biomesAlgae.cfg
    • Biomes where coral can appear: biomesCoral.cfg
    • Biomes where reeds can appear: biomesReeds.cfg

Blocks

  • Path: assets/betterfoliage/
    • Cactus: blocksCactus.cfg
    • Dirt: blocksDirt.cfg
    • Extra Leaves: blocksExtraLeaves.cfg
    • Falling Leaves: blocksFallingLeaves.cfg
    • Grass: blocksGrass.cfg
    • Lilypad: blocksLilypad.cfg
    • Logs: blocksLogs.cfg
    • Blocks that obstruct short grass / mycelium: blocksObstructsShortGrass.cfg
    • Sand: blocksSand.cfg
    • Soul Sand: blocksSoulSand.cfg

Texture Sets

Some features in the mod make use of texture sets. These can be composed of any number of individual textures as long as they have a predetermined prefix and end in .png.

The mod will use any PNG in the folder assets/bettergrassandleaves/textures/blocks/ and whose name starts with better_algae_ as a valid algae texture. These file may come from any active resource pack or mod, and the mod will ensure to collect and use all unique filenames found.

This means you could, for example, create a custom file named assets/bettergrassandleaves/textures/blocks/better_algae_new.png and the mod will use it when rendering algae.

For compatibility with older resource packs made for the original Better Foliage mod, some assets exist under the legacy domain name of bettergrassandleaves while others use the newer domain name, betterfoliage.

Algae

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: better_algae_
  • Pre-included:
    better_algae_0.png
    better_algae_1.png
    better_algae_2.png
    better_algae_3.png

Cactus Arms

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: better_cactus_arm_
  • Pre-included:
    better_cactus_arm_0.png
    better_cactus_arm_1.png

Coral Branches

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: better_coral_
  • Pre-included:
    better_coral_0.png
    better_coral_1.png
    better_coral_2.png
    better_coral_3.png
    better_coral_4.png
    better_coral_5.png

Coral Crust

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: better_crust_
  • Pre-included:
    better_crust_0.png
    better_crust_1.png
    better_crust_2.png
    better_crust_3.png

Short Grass

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: better_grass_long_
  • Pre-included:
    better_grass_long_0.png
    better_grass_long_1.png
    better_grass_long_2.png
    better_grass_long_3.png
    better_grass_long_4.png

Short Grass (Covered by Snow)

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: better_grass_snowed_
  • Pre-included:
    better_grass_snowed_0.png
    better_grass_snowed_1.png

Extra Leaves (Snow Covering)

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: better_leaves_snowed_
  • Pre-included:
    better_leaves_snowed_0.png
    better_leaves_snowed_1.png
    better_leaves_snowed_2.png

Lilypad Flowers

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: better_lilypad_flower_
  • Pre-included:
    better_lilypad_flower_0.png
    better_lilypad_flower_1.png

Lilypad Roots

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: better_lilypad_roots_
  • Pre-included:
    better_lilypad_roots_0.png
    better_lilypad_roots_1.png
    better_lilypad_roots_2.png

Short Mycelium

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: better_mycel_
  • Pre-included:
    better_mycel_0.png
    better_mycel_1.png
    better_mycel_2.png
    better_mycel_3.png

Netherrack Vines

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: better_netherrack_
  • Pre-included:
    better_netherrack_0.png
    better_netherrack_1.png
    better_netherrack_2.png

Reeds

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: better_reed_
  • Pre-included:
    better_reed_0.png
    better_reed_1.png
    better_reed_2.png
    better_reed_3.png

Rising Souls

  • Path: assets/bettergrassandleaves/textures/blocks/
  • Prefix: rising_soul_
  • Pre-included:
    rising_soul_0.png
    rising_soul_1.png

Custom Leaf Particles and Custom Masks for Extra Leaves

Different leaf particles can be created for each block type by adding the file assets/betterfoliage/leafParticleTextureMappings.cfg to your resource pack and adding entries for each desired mapping. The same can be done for custom leaf masks by adding the file assets/betterfoliage/leafMaskTextureMappings.cfg

A mapping entry is in one of two formats:
searchKey=mappedType or modName:searchKey=mappedType.

If modName is omitted, the mod will try to find the text searchKey (ignoring the case) in the name of each valid leaf block. The first match will determine its category. If no mapping is found the category will be set as default.

If instead modName is present then that particular mapping will only be valid for blocks from the mod in question, for which the searchKey matching will continue as before.

Leaf blocks are mapped into two different categories, one for its leaf particles and one for the alpha mask that will be used when generating Extra Leaves textures for that particular leaf block. After being mapped, the selection for the valid textures follows the same rules as the ones for Texture Sets described above.

Leaf Particles

  • Path: assets/betterfoliage/textures/blocks/
  • Prefix: falling_leaf_
  • Pre-existing categories:
    default, jungle, spruce
  • Pre-included:
    falling_leaf_default_0.png
    falling_leaf_default_1.png
    falling_leaf_default_2.png
    falling_leaf_default_3.png
    falling_leaf_jungle_0.png
    falling_leaf_jungle_1.png
    falling_leaf_jungle_2.png
    falling_leaf_jungle_3.png
    falling_leaf_spruce_0.png
    falling_leaf_spruce_1.png
    falling_leaf_spruce_2.png
    falling_leaf_spruce_3.png

Mask mappings for Extra Leaves have an additional detail. The naming of the mask textures will also include the pixel size of the dynamically generated extra leaf texture. The mask chosen will be the one that most closely fits a texture of double the size of the leaf block texture.

For example: If the leaf block texture is 16x16 the leaf mask texture will be 32x32. If the former is 64x64 the mod will attempt to locate a 128x128 mask texture, defaulting back to smaller sizes if not found, first looking for a 64x64 mask and then a 32x32 (the default) if none before were found.

Extra Leaf Mask Mappings

  • Path: assets/betterfoliage/textures/blocks/
  • Prefix: leafmask_
  • Pre-existing categories:
    default, fine, full, jumbled, spotty
  • Pre-included:
    leafmask_32_default.png
    leafmask_32_fine.png
    leafmask_32_full.png
    leafmask_32_jumbled.png
    leafmask_32_spotty.png

Last updated: Version 2.0.0