| Name | <server.generate_loot_table[id=<id>;location=<location>;(killer=<entity>);(entity=<entity>);(loot_bonus=<#>/{-1});(luck=<#.#>/{0})]> |
| Returns | ListTag(ItemTag) |
| Description | Returns a list of items from a loot table, given a map of input data.
Required input: id: the loot table ID, location: the location where it's being generated (LocationTag). Optional inputs: killer: an online player (or player-type NPC) that is looting, entity: a dead entity being looted from (a valid EntityTag instance that is or was spawned in the world), loot_bonus: the loot bonus level (defaults to -1) as an integer number, luck: the luck potion level (defaults to 0) as a decimal number. Some inputs will be strictly required for some loot tables, and ignored for others. A list of valid loot tables can be found here: https://minecraft.wiki/w/Loot_table#List_of_loot_tables Note that the tree view represented on the wiki should be split by slashes for the input - for example, "cow" is under "entities" in the tree so "entities/cow" is how you input that. CAUTION: Invalid loot table IDs will generate an empty list rather than an error. |
| Example | |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1796 |