πŸŽ‹Saplings

Learn how to create custom saplings with Foliage.

How does it work?

In Minecraft, saplings are special blocks that can grow into trees. Our plugin extends this functionality to allow you to create custom saplings with unique properties:

  • Custom models and textures

  • Configurable growth conditions

  • Custom tree structures using schematics

  • Integration with ItemsAdder and Nexo

  • Custom sound effects

Default Example

custom_saplings:
  maple_sapling: #Example using ItemsAdder integration
    item:
      itemsadder: custom_blocks:maple_sapling
    block:
      base_material: OAK_SAPLING
      stage: 0
      growth:
        chance: 15
        schematics:
          - "maple_tree1.schem"
          - "maple_tree2.schem"
        random_rotation: true
        min_light: 9
        allow_bonemeal: true
        required_blocks:
          - "GRASS_BLOCK"
          - "DIRT"
          - "PODZOL"
        required_height: 7
        space_check:
          enabled: true
          radius: 2
          height: 5
    drops: "maple_sapling" #Use the name from drops.yml

  fir_sapling: #Example using Nexo integration
    item:
      nexo: fir_sapling
    block:
      base_material: OAK_SAPLING
      stage: 0
      growth:
        chance: 10
        schematics:
          - "fir_tree.schem"
        random_rotation: true
    drops: "fir_sapling"

Creating Custom Saplings

For example, let's create a Maple Sapling block. Let's assume that you have already created your custom model.

1. Custom Item Creation

Create a basic item using Nexo or ItemsAdder without setting a custom block mechanic. Alternatively, you can use a vanilla item with custom model data.

2. Hook Your Item

Hook your custom item to your custom sapling block in the item section:

3. Configure Block Properties

Set up the block properties in the block section:

4. Add Custom Sounds (Optional)

You can add custom sounds for various block interactions:

5. Create a Drop Table

πŸ“‘Drop Tables

6. Connect the Drop Table

Link your drop table to the sapling:

7. Reload the Plugin

Use /foliage reload command to reload the plugin and load your new blocks.

8. Get the Block

Use /foliage give sapling maple_sapling command to give yourself your custom sapling block.

Important Notes

  • Make sure your tree schematics are placed in the plugins/Foliage/schematics directory

  • The stage property determines the sapling's growth stage (0 or 1)

  • Growth chance is calculated per random tick

  • Required blocks define what blocks the sapling can be placed on

  • Space check ensures there's enough room for the tree to grow

  • Custom model data is only used for vanilla items (not needed for ItemsAdder/Nexo items)

Last updated