New Loot Conditions - DaFuqs/Spectrum GitHub Wiki
Spectrum adds new loot conditions that can be used in loot tables to check if certain conditions are met.
spectrum:random_chance_with_treasure_hunter
Checks if a kill was done with a Treasure Hunter enchanted tool.
Note that this condition also checks if the player has unlocked the Treasure Hunter enchantment. If the enchantment is still showing up obfuscated for the player it always defaults to false
.
Data
Entry | Type | Description |
---|---|---|
chance | float | The chance of this criterion evaluating to true, multiplied by the used tools level of Treasure Hunter |
advancement_trigger | string | When this criterion evaluates to true, a string used for triggering the Treasure Hunter Drop Advancement Criterion |
Example
When the loot table is triggered by a kill with a Treasure Hunter I enchanted tool, there will be a 10% chance of dropping a Wither Skeleton Skull. (20% for Treasure Hunter II, ...).
When the skull drops, the player receives advancements that check for the mob_head
descriptor in the spectrum:treasure_hunter_drop
advancement criterion.
{
"type": "minecraft:item",
"name": "minecraft:wither_skeleton_skull",
"conditions": [
{
"condition": "spectrum:random_chance_with_treasure_hunter",
"chance": 0.1,
"advancement_trigger": "mob_head"
}
]
}