Package net.minecraft.loot.function
Class ConditionalLootFunction
java.lang.Object
net.minecraft.loot.function.ConditionalLootFunction
- All Implemented Interfaces:
BiFunction<ItemStack,LootContext,ItemStack>,LootContextAware,LootFunction
- Direct Known Subclasses:
ApplyBonusLootFunction,CopyNameLootFunction,CopyNbtLootFunction,CopyStateFunction,EnchantRandomlyLootFunction,EnchantWithLevelsLootFunction,ExplorationMapLootFunction,ExplosionDecayLootFunction,FillPlayerHeadLootFunction,FurnaceSmeltLootFunction,LimitCountLootFunction,LootingEnchantLootFunction,SetAttributesLootFunction,SetContentsLootFunction,SetCountLootFunction,SetDamageLootFunction,SetLootTableLootFunction,SetLoreLootFunction,SetNameLootFunction,SetNbtLootFunction,SetStewEffectLootFunction
public abstract class ConditionalLootFunction extends Object implements LootFunction
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConditionalLootFunction.Builder<T extends ConditionalLootFunction.Builder<T>>(package private) static classConditionalLootFunction.Joinerstatic classConditionalLootFunction.Serializer<T extends ConditionalLootFunction> -
Field Summary
Fields Modifier and Type Field Description protected LootCondition[]conditionsprivate Predicate<LootContext>predicate -
Constructor Summary
Constructors Modifier Constructor Description protectedConditionalLootFunction(LootCondition[] conditions) -
Method Summary
Modifier and Type Method Description ItemStackapply(ItemStack itemStack, LootContext lootContext)protected static ConditionalLootFunction.Builder<?>builder(Function<LootCondition[],LootFunction> joiner)protected abstract ItemStackprocess(ItemStack stack, LootContext context)voidvalidate(LootTableReporter reporter)
-
Field Details
-
Constructor Details
-
Method Details
-
apply
- Specified by:
applyin interfaceBiFunction<ItemStack,LootContext,ItemStack>
-
process
-
validate
- Specified by:
validatein interfaceLootContextAware
-
builder
protected static ConditionalLootFunction.Builder<?> builder(Function<LootCondition[],LootFunction> joiner)
-