Economy and Mining Drop Control and Custimization + Anti XRAY

The following is the default configuration.
auto_pickup_drops: false
suppress_block_drop_on_custom_drop: true
blocks:
stone:
drop: cobblestone
deepslate:
drop: cobbled_deepslate
veins:
cooldown: 5s
vein_base_chance: 0.482
token_window: 20s
token_range: 8
enchant_modifiers:
fortune:
vein_chance_mult: 0.05
looting:
vein_chance_mult: 0.02
luck:
vein_chance_mult: 0.03
unluck:
vein_chance_mult: -0.05
vein_start_sound:
sound: "BLOCK_BEACON_POWER_SELECT"
volume: 1.0
pitch: 1.0
drops:
- item: coal
chance: 0.0069
min_y: 0
max_y: 320
fortune_multiplier: true
tool_tiers: [WOODEN_PICKAXE, STONE_PICKAXE, COPPER_PICKAXE, IRON_PICKAXE, GOLDEN_PICKAXE, DIAMOND_PICKAXE, NETHERITE_PICKAXE]
vein_max_size: 20
exp_drop: 2
- item: raw_copper
chance: 0.0043
min_y: -16
max_y: 112
fortune_multiplier: true
tool_tiers: [COPPER_PICKAXE, IRON_PICKAXE, GOLDEN_PICKAXE, DIAMOND_PICKAXE, NETHERITE_PICKAXE]
vein_max_size: 10
exp_drop: 2
- item: raw_iron
chance: 0.0040
min_y: -64
max_y: 320
fortune_multiplier: false
tool_tiers: [COPPER_PICKAXE, IRON_PICKAXE, GOLDEN_PICKAXE, DIAMOND_PICKAXE, NETHERITE_PICKAXE]
vein_max_size: 12
exp_drop: 0
- item: raw_gold
chance: 0.0022
min_y: -64
max_y: 32
fortune_multiplier: false
tool_tiers: [IRON_PICKAXE, GOLDEN_PICKAXE, DIAMOND_PICKAXE, NETHERITE_PICKAXE]
vein_max_size: 10
exp_drop: 0
- item: redstone
chance: 0.0020
min_y: -64
max_y: 16
fortune_multiplier: true
tool_tiers: [IRON_PICKAXE, GOLDEN_PICKAXE, DIAMOND_PICKAXE, NETHERITE_PICKAXE]
vein_max_size: 8
exp_drop: 1
- item: lapis_lazuli
chance: 0.0011
min_y: -64
max_y: 64
fortune_multiplier: true
tool_tiers: [COPPER_PICKAXE, IRON_PICKAXE, GOLDEN_PICKAXE, DIAMOND_PICKAXE, NETHERITE_PICKAXE]
vein_max_size: 6
exp_drop: 5
- item: diamond
chance: 0.0008
min_y: -64
max_y: 16
fortune_multiplier: true
tool_tiers: [IRON_PICKAXE, GOLDEN_PICKAXE, DIAMOND_PICKAXE, NETHERITE_PICKAXE]
vein_max_size: 8
exp_drop: 7
- item: emerald
chance: 0.0006
min_y: -16
max_y: 320
fortune_multiplier: true
tool_tiers: [IRON_PICKAXE, GOLDEN_PICKAXE, DIAMOND_PICKAXE, NETHERITE_PICKAXE]
vein_max_size: 2
exp_drop: 7
Adding new drops is simple, Add a new object in items followinig this format
drops:
- item: itemname # Lowercase whatever follows minecraft:raw_iron
chance: 0.0069 # Maximum 6 decimal accuracy. Take the per chunk percentage spawn chance converted to a decimal between 0 and 1, and then divide by 19,816. This is going to make the drop feel really rare, but it makes mining result in the same amount of material on average given the same amount of time spent mining. However this assumes a player mining blind, but they search for ore, and have an instinct for where and how it spawns, meaning actual discovery is sometimes as much as 10 times the calculated drop chance, and if you are not super concerned about your interplayer economy, you can multiply the calculated chance by up to 10.
min_y: 0 # Supports a negative Y value
max_y: 320
fortune_multiplier: true
tool_tiers: [WOODEN_PICKAXE, STONE_PICKAXE, COPPER_PICKAXE, IRON_PICKAXE, GOLDEN_PICKAXE, DIAMOND_PICKAXE, NETHERITE_PICKAXE] # Remove the tiers you don't want to be able to mine this drop.
vein_max_size: 20 # Max possible size of a vein
exp_drop: 2
You can also add commands as drops, for example if you want there to be a rare chance to mine a custom item that needs to be given via a command. Simply add the following into the drops object like an item:
# Example command drop (percentage chance only, not affected by enchantments/veins/XP)
# You can specify whether you want the command to be executed by the player, or console using "player:" and "console:"
# If you don't specify what it will run as, it will default to what you have execute_as set to
- type: command
commands:
- "player:say I rolled a player-level bonus!"
- "console:say %player% rolled a server-level bonus!"
- "give %player% diamond 1"
chance: 0.0005
min_y: -64
max_y: 320
execute_as: console