Random Drops

The Random Drops system allows users to define item drops from specific blocks with customizable chances, adding variety and excitement to gameplay. This guide explains how to configure the random_drops.yml file to suit your needs.
File Structure
The random_drops.yml file is divided into three main sections:
Global Settings:
Controls whether random drops are enabled and their overall probability.
Chances:
Defines specific items, the blocks they drop from, and the likelihood of their drops.
Configuration Example
Here’s an example configuration:
chanced_drop: true
chance_to_drop: 10
chances:
apple:
blocks:
- BIRCH_LEAVES
- OAK_LEAVES
- DARK_OAK_LEAVES
chance: 60
cabbage:
blocks:
- SHORT_GRASS
- FERN
- TALL_GRASS
chance: 50
tomato:
blocks:
- SHORT_GRASS
- TALL_GRASS
chance: 801. Global Settings
chanced_drop
Type: Boolean (
trueorfalse)Description: Enables or disables the random drops system.
Example:
chanced_drop: true
chance_to_drop
Type: Integer (1–100)
Description: Sets the overall chance (in percentage) of any random drop occurring when breaking a block.
Example:
chance_to_drop: 10In this example, there’s a 10% chance that a random drop will occur when breaking a block.
2. Chances
Each entry under the chances section represents an item and includes the following properties:
blocks
Type: List
Description: Specifies the blocks that can drop the item.
Example:
blocks: - BIRCH_LEAVES - OAK_LEAVES - DARK_OAK_LEAVES
chance
Type: Integer (1–100)
Description: Sets the likelihood (in percentage) of the item dropping when a defined block is broken.
Example:
chance: 60In this example, there is a 60% chance of the item dropping if the block is broken.
Adding or Modifying Drops
Step 1: Define a New Item
Add a new entry under chances for the item you want to include. For example, to add a "pineapple" drop:
pineapple:
blocks:
- SHORT_GRASS
- FERN
- TALL_GRASS
chance: 65Step 2: Associate Blocks
List all the blocks from which the item can drop under the blocks key.
Step 3: Set Drop Chance
Set the probability of the item dropping using the chance key.
Last updated