Package org.bukkit.loot

# Interface LootTable

All Superinterfaces:
  `net.kyori.adventure.key.Keyed`, `Keyed`

public interface LootTable extends Keyed
LootTables are technical files that represent what items should be in naturally generated containers, what items should be dropped when killing a mob, or what items can be fished. See the Minecraft Wiki for more information.

## Method Summary

Modifier and Type
Method
Description
`void`
`fillInventory(@NotNull Inventory inventory, @Nullable Random random, @NotNull LootContext context)`
Attempt to fill an inventory with this LootTable's loot.
`@NotNull Collection<ItemStack>`
`populateLoot(@Nullable Random random, @NotNull LootContext context)`
Returns a mutable list of loot generated by this LootTable.

### Methods inherited from interface org.bukkit.Keyed

`getKey, key`

## Method Details

### populateLoot

@NotNull @NotNull Collection<ItemStack> populateLoot(@Nullable @Nullable Random random, @NotNull @NotNull LootContext context)
Returns a mutable list of loot generated by this LootTable.

Parameters:
  `random` - the random instance to use to generate loot
  `context` - context within to populate loot
Returns:
  a list of ItemStacks

### fillInventory

void fillInventory(@NotNull @NotNull Inventory inventory, @Nullable @Nullable Random random, @NotNull @NotNull LootContext context)
Attempt to fill an inventory with this LootTable's loot.

Parameters:
  `inventory` - the inventory to fill
  `random` - the random instance to use to generate loot
  `context` - context within to populate loot