Package net.fabricmc.fabric.api.loot.v2
package net.fabricmc.fabric.api.loot.v2
The Fabric Loot API for manipulating and creating loot tables.
Events
LootTableEvents has events to modify existing loot tables,
or outright replace them with a new loot table.
You can also check where loot tables are coming from in those events with
LootTableSource. This is useful when you only want to modify
loot tables from mods or vanilla, but not user-created data packs.
Extended loot table and pool builders
This API has injected interfaces to add useful methods to loot table and loot pool builders. They let you add pre-built objects instead of builders, and collections of objects to the builder with one method call.-
ClassDescriptionConvenience extensions to
LootPool.Builderfor adding pre-built objects or collections.Convenience extensions toLootTable.Builderfor adding pre-built objects or collections and modifying loot pools.Events for manipulating loot tables.Describes where a loot table has been loaded from.