fabric/fabric-loot-api-v3
modmuss 47f22c2eab
25w14craftmine ()
* 25w14craftmine part 1

* Dealt with some stuff that was eaten

Because some new thing decided to eat everything in MinecraftServer for some reason. The End was fed to the Void.

* Port fabric-resource-loader-v0 to 25w14craftmine.

* Remove leftover imports from migrating MinecraftServer to GameInstance.

* Port fabric-lifecycle-events-v1 to 25w14craftmine.

* Work on a networking-api-v1 port to 25w14craftmine.

* Work on a networking-api-v1 port to 25w14craftmine.

* Compiles :)

* More fixes

* Ingame?!?

* Fix tests

* Bump versions

---------

Co-authored-by: DaveyL2013 <20153257+DaveyL2013@users.noreply.github.com>
Co-authored-by: Mikarific <mikerific2@gmail.com>
2025-04-03 19:27:22 +01:00
..
src 25w14craftmine () 2025-04-03 19:27:22 +01:00
build.gradle fabric-loot-api-v3 () 2024-07-07 13:52:31 +01:00
README.md fabric-loot-api-v3 () 2024-07-07 13:52:31 +01:00

Fabric Loot API (v3)

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.