Package net.fabricmc.fabric.api.loot.v2
Interface FabricLootPoolBuilder
Convenience extensions to
LootPool.Builder
for adding pre-built objects or collections.
This interface is automatically injected to LootPool.Builder
.
-
Method Summary
Modifier and TypeMethodDescriptiondefault LootPool.Builder
apply
(Collection<? extends LootFunction> functions) Applies loot functions to this builder.default LootPool.Builder
apply
(LootFunction function) Applies a function to this builder.default LootPool.Builder
conditionally
(Collection<? extends LootCondition> conditions) Adds conditions to this builder.default LootPool.Builder
conditionally
(LootCondition condition) Adds a condition to this builder.static LootPool.Builder
Creates a builder copy of a loot pool.default LootPool.Builder
with
(Collection<? extends LootPoolEntry> entries) Adds entries to this builder.default LootPool.Builder
with
(LootPoolEntry entry) Adds an entry to this builder.
-
Method Details
-
with
Adds an entry to this builder.- Parameters:
entry
- the added loot entry- Returns:
- this builder
-
with
Adds entries to this builder.- Parameters:
entries
- the added loot entries- Returns:
- this builder
-
conditionally
Adds a condition to this builder.- Parameters:
condition
- the added condition- Returns:
- this builder
-
conditionally
Adds conditions to this builder.- Parameters:
conditions
- the added conditions- Returns:
- this builder
-
apply
Applies a function to this builder.- Parameters:
function
- the applied loot function- Returns:
- this builder
-
apply
Applies loot functions to this builder.- Parameters:
functions
- the applied loot functions- Returns:
- this builder
-
copyOf
Creates a builder copy of a loot pool.- Parameters:
pool
- the loot pool- Returns:
- the copied builder
-