| Name | loot generates |
| Event Lines | loot generates |
| Triggers | when loot is generated somewhere in the world (like a vanilla chest being opened for the first time). |
| Generated Examples | after loot generates: |
| Has Player | when the linked entity is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
| Switches | for:<type> to only process the event if a certain inventory type is receiving loot (like 'for:chest'). |
| Contexts | <context.entity> returns an entity that caused loot generation, if any.
<context.inventory> returns the InventoryTag that loot is generating into.
<context.items> returns a ListTag of the items being generated.
<context.loot_table_id> returns an element indicating the minecraft key for the loot-table that was generated.
|
| Determine | "LOOT:<ListTag(ItemTag)>" to change the list of items that will generate as loot. |
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | World |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/world/LootGenerateScriptEvent.java#L22 |