3434862fbd
Breaking changes: - `FabricBrewingRecipeRegistry.registerPotionRecipe` takes `RegistryEntry<Potion>` instead of `Potion` - `SculkSensorFrequencyRegistry.regster` takes `RegistryKey<GameEvent>` instead of `GameEvent` - `FabricLanguageProvider.add` takes `RegistryEntry<EntityAttribute>` instead of `EntityAttribute` - `FabricTagProvider.GameEventTagProvider` was removed replace with `FabricTagProvider<GameEvent>` - `FabricItem.getAttributeModifiers` returns a Multimap with a key of `RegistryEntry<EntityAttribute>` instead of `EntityAttribute` - `ModifyItemAttributeModifiersCallback.modifyAttributeModifiers` takes Multimap with a key of `RegistryEntry<EntityAttribute>` instead of `EntityAttribute` |
||
---|---|---|
.. | ||
src | ||
build.gradle | ||
README.md |
Fabric Loot API (v2)
This module includes APIs for modifying and creating loot tables.
Loot table events
This class provides two events for modifying loot tables.
LootTableEvents.REPLACE
runs first and lets you replace loot tables completely.
LootTableEvents.MODIFY
runs after and lets you modify loot tables, including the ones created in REPLACE
,
by adding new loot pools or loot functions to them.
Loot table sources
Both events have access to a loot table source that you can use to check where a loot table is loaded from.
For example, you can use this to check if a loot table is from a user data pack and not modify the user-provided data in your event.
Enhanced loot table and loot pool builders
LootTable.Builder
and LootPool.Builder
implement
injected interfaces (FabricLootTableBuilder
and FabricLootPoolBuilder
)
which have additional methods for dealing with already-built objects and collections of objects.
Those interfaces also have copyOf
methods for creating copies of existing loot tables/pools as builders.