📑Drop Tables
Learn how you can create custom drops for your Foliage blocks.
What Are Drop Tables?
Drop tables define what items players receive when breaking custom blocks. Each custom block can be linked to a drop table that contains one or more potential drops with different chances.
Configuration
Drop tables are configured in the drops.yml
file.
Basic Structure
drop-tables:
table_name:
drops:
drop_id:
material: MATERIAL_NAME
amount: 1-3
chance: 0.5
fortune-affected: true
Linking Drop Tables to Blocks
In your custom block configuration files, you can link a drop table to a block:
custom_leaves:
my_custom_leaves:
# ... other block settings ...
drops: "table_name" # References a table in drops.yml
Drop Configuration Options
Each drop in a table has the following settings:
material
Vanilla material type
OAK_SAPLING
amount
Number or range of items
1
or 1-3
chance
Probability from 0-1
0.05
(5% chance)
fortune-affected
Whether fortune enchantment affects it
true
or false
itemsadder
ItemsAdder item ID (optional)
custom_blocks:ruby
nexo
Nexo item ID (optional)
ruby_gem
custom-model-data
Custom model data for vanilla items
12345
Examples
Simple Drop Table
drop-tables:
oak_leaves:
drops:
apple:
material: APPLE
amount: 1
chance: 0.1
fortune-affected: false
stick:
material: STICK
amount: 1-2
chance: 0.2
fortune-affected: true
Custom Item Drops
For ItemsAdder or Nexo items:
drop-tables:
custom_fruit_leaves:
drops:
special_fruit:
itemsadder: custom_fruits:orange
amount: 1
chance: 0.05
fortune-affected: true
nexo_gem:
nexo: rare_gems:ruby
amount: 1
chance: 0.01
fortune-affected: true
How It Works
When a player breaks a custom block, the plugin checks if it has a drop table
If a drop table exists, the plugin rolls a random chance for each item in the table
For each successful roll, the item is dropped with the specified amount
If the player's tool has Fortune enchantment and the drop is affected by fortune, the amount may increase
Tips for Balanced Drop Tables
Use low chances (0.01-0.05) for rare items
Use amount ranges (e.g.,
1-3
) to vary the experienceEnable
fortune-affected: true
for resources that should be affected by the Fortune enchantmentKeep drop tables organized by naming them after the block they're for
Troubleshooting
If drops aren't working:
Ensure your block's config has the correct
drops
entry matching a table indrops.yml
Check that the item IDs for ItemsAdder or Nexo are correct
Verify all materials are valid Minecraft material names
Enable debug logging to trace drop issues:
debug.log-drops: true
inconfig.yml
Last updated