Random Drops
Last updated
Last updated
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
Type: Boolean (true
or false
)
Description: Enables or disables the random drops system.
Example:
chance_to_drop
Type: Integer (1–100)
Description: Sets the overall chance (in percentage) of any random drop occurring when breaking a block.
Example:
In this example, there’s a 10% chance that a random drop will occur when breaking a block.
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:
chance
Type: Integer (1–100)
Description: Sets the likelihood (in percentage) of the item dropping when a defined block is broken.
Example:
In this example, there is a 60% chance of the item dropping if the block is broken.
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:
Step 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.