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
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
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
directoryThe
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