Package net.fabricmc.fabric.api.loot.v2
Interface FabricLootTableBuilder
Deprecated.
Convenience extensions to
LootTable.Builder
for adding pre-built objects or collections and modifying loot pools.
This interface is automatically injected to LootTable.Builder.
-
Method Summary
Modifier and TypeMethodDescriptiondefault net.minecraft.world.level.storage.loot.LootTable.Builderapply(Collection<? extends net.minecraft.world.level.storage.loot.functions.LootItemFunction> functions) Deprecated.useFabricLootTableBuilder.apply(Collection)instead.default net.minecraft.world.level.storage.loot.LootTable.Builderapply(net.minecraft.world.level.storage.loot.functions.LootItemFunction function) Deprecated.useFabricLootTableBuilder.apply(LootItemFunction)instead.static net.minecraft.world.level.storage.loot.LootTable.BuildercopyOf(net.minecraft.world.level.storage.loot.LootTable table) Deprecated.useFabricLootTableBuilder.copyOf(LootTable)instead.default net.minecraft.world.level.storage.loot.LootTable.BuildermodifyPools(Consumer<? super net.minecraft.world.level.storage.loot.LootPool.Builder> modifier) Deprecated.useFabricLootTableBuilder.modifyPools(Consumer)instead.default net.minecraft.world.level.storage.loot.LootTable.Builderpool(net.minecraft.world.level.storage.loot.LootPool pool) Deprecated.useFabricLootTableBuilder.pool(LootPool)instead.default net.minecraft.world.level.storage.loot.LootTable.Builderpools(Collection<? extends net.minecraft.world.level.storage.loot.LootPool> pools) Deprecated.useFabricLootTableBuilder.pools(Collection)instead.
-
Method Details
-
pool
@Deprecated default net.minecraft.world.level.storage.loot.LootTable.Builder pool(net.minecraft.world.level.storage.loot.LootPool pool) Deprecated.useFabricLootTableBuilder.pool(LootPool)instead.Adds a loot pool to this builder.- Parameters:
pool- the added pool- Returns:
- this builder
-
apply
@Deprecated default net.minecraft.world.level.storage.loot.LootTable.Builder apply(net.minecraft.world.level.storage.loot.functions.LootItemFunction function) Deprecated.useFabricLootTableBuilder.apply(LootItemFunction)instead.Applies a loot function to this builder.- Parameters:
function- the applied function- Returns:
- this builder
-
pools
@Deprecated default net.minecraft.world.level.storage.loot.LootTable.Builder pools(Collection<? extends net.minecraft.world.level.storage.loot.LootPool> pools) Deprecated.useFabricLootTableBuilder.pools(Collection)instead.Adds loot pools to this builder.- Parameters:
pools- the added pools- Returns:
- this builder
-
apply
@Deprecated default net.minecraft.world.level.storage.loot.LootTable.Builder apply(Collection<? extends net.minecraft.world.level.storage.loot.functions.LootItemFunction> functions) Deprecated.useFabricLootTableBuilder.apply(Collection)instead.Applies loot functions to this builder.- Parameters:
functions- the applied functions- Returns:
- this builder
-
modifyPools
@Deprecated default net.minecraft.world.level.storage.loot.LootTable.Builder modifyPools(Consumer<? super net.minecraft.world.level.storage.loot.LootPool.Builder> modifier) Deprecated.useFabricLootTableBuilder.modifyPools(Consumer)instead.Modifies all loot pools already present in this builder.This method can be used instead of simply adding a new pool when you want the loot table to only drop items from one of the loot pool entries instead of both.
Calling this method turns all pools into builders and rebuilds them back into loot pools afterwards, so it is more efficient to do all transformations with one
modifyPoolscall.- Parameters:
modifier- the modifying function- Returns:
- this builder
-
copyOf
@Deprecated static net.minecraft.world.level.storage.loot.LootTable.Builder copyOf(net.minecraft.world.level.storage.loot.LootTable table) Deprecated.useFabricLootTableBuilder.copyOf(LootTable)instead.Creates a builder copy of a loot table.- Parameters:
table- the loot table- Returns:
- the copied builder
-
FabricLootTableBuilderinstead.