Generate Loot (Effect) — Skript

Addon: Skript · Category: Effect · Since: 2.10

Syntax

generate [the] loot (of|using) %loottable% [(with|using) %-lootcontext%] in %inventories%

Description

Generates the loot in the specified inventories from a loot table using a loot context. Not specifying a loot context will use a loot context with a location at the world's origin. Note that if the inventory is full, it will cause warnings in the console due to over-filling the inventory.

Examples

generate loot of loot table "minecraft:chests/simple_dungeon" using loot context at player in {_inventory}
generate loot using "minecraft:chests/shipwreck_supply" in {_inventory}

View source