Sometimes you make a pack so hard that you feel bad for that person with 500 deaths on your server.
With this mod you can configure what happens when someone dies! You can play sounds or give items!
Example JSON
{
"*": {
"loot": {"pools":[{"rolls":1,"entries":[{"type":"item","weight":1,"name":"minecraft:stone"}]}]}
},
"0": {
"sound": "lolyoudied:lol_you_died"
},
"*/10": {
"loot": "minecraft:chests/spawn_bonus_chest",
"sound": "minecraft:entity.enderdragon.death"
}
}
The selector
The keys of the root object determine at what death which things happen. Multiple things can trigger per death.
- The death counting starts with 1, not 0!
- 'n' and 'm' are positive integers.
- 'a' and 'b' are other selector strings.
- You can **not** combine different types of "base selectors".
- You can combine multiple logic selectors, as long as they have the same type of "base selector".
Base selectors
| Type | Selector | Example | Text |
|---|---|---|---|
| ALWAYS | 0 | "0" | Every death |
| LEFTOVER | * | "*" | Every death not specified (`0` matches excluded) |
| REGULAR | _n_ | "7" | Death number _n_ |
| REGULAR | _n_-_m_ | "10-20" | Death _n_ trough _m_, _n_ and _m_ included |
| REGULAR | _n_- | "10-" | Death _n_ trough ∞, _n_ included |
- Deaths 1 trough _n_ should be written as "1-_n_", "-_n_" is not a special case and will error.
Logic selectors
| Selector | Example | Text |
|---|---|---|
| _a_;_b_ | "1;2;3" | _a_ or _b_ |
| _a_/_n_ | "10-20/2" | Deaths specified by _a_ but only if divisible by _n_ |
| _a_/_n_%_m_ | "10-20/2%1" | Same as above but with remainder equals to _m_ |
The event
- All loot will be applied.
- All sounds specified will be added to a list and one will be randomly picked.
| Key | Data | Text |
|---|---|---|
| "sound" | string | One sound event name |
| "sound" | array of strings | Add all sounds to random list |
| "loot" | string | One loot table name |
| "loot" | loot table JSON | One loot table |
| "loot" | array of loot pools | Same as above, but with wrapper object removed |

