๐Leaves
Learn how to create custom leaves with Foliage.
How does it work ?
In Minecraft, a block can have multiple blockstates, each blockstate can show a custom block model, and depending on the situation, Minecraft will set a specific blockstate to a block. Our plugin will use this feature to add new leaves blocks to the game:
Default example
custom_leaves:
fir_leaves: #Example using ItemsAdder integration
item:
itemsadder: custom_blocks:fir_leaves
block:
base_material: AZALEA_LEAVES
distance: 3
persistent: true
model: "custom_blocks:leaves/fir_leaves/fir_leaves" #Use a single model
drops: "fir_leaves" #Use the name from drops.yml
maple_leaves: #Example using Nexo integration
item:
nexo: maple_leaves
block:
base_material: AZALEA_LEAVES
distance: 4
persistent: true
models: #Use multiple models
- "leaves/maple_leaves/maple_leaves"
- "leaves/maple_leaves/maple_leaves1"
- "leaves/maple_leaves/maple_leaves2"
- "leaves/maple_leaves/maple_leaves3"
drops: "maple_leaves" #Use the name from drops.yml
Creating custom leaves
For example, I want to create a Maple Leaves block. Let's assume that you have already created your custom model.
Custom item creation
Create a basic item using Nexo or ItemsAdder without setting a custom block mechanic.
Hook your item
Hook your custom item to your custom leaf block in the item
section.
custom_leaves:
maple_leaves:
item:
itemsadder: custom_blocks:maple_leaves #ItemsAdder item
# OR
nexo: maple_leaves #Nexo item
# OR
material: PAPER
name: "Maple Leaves"
custom_model_data: 1000
lore:
- "Example item lore."
Create your block
Create the custom block in the block
section and use the correct model path for model
or models
value:
custom_leaves:
maple_leaves:
block:
base_material: AZALEA_LEAVES
distance: 3
persistent: true
model: "leaves/maple_leaves/maple_leaves" #Use a single model
# OR
models: #Use multiple models
- "leaves/maple_leaves/maple_leaves"
- "leaves/maple_leaves/maple_leaves1"
- "leaves/maple_leaves/maple_leaves2"
- "leaves/maple_leaves/maple_leaves3"
Note: the model value is optional, it is only used to generate the correct blockstate file for your resource pack.
Create a drop table
Everything is detailed in the Drop Tables dedicated page.
Last updated