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,SetBannerPatternFunction,SetContentsLootFunction,SetCountLootFunction,SetDamageLootFunction,SetEnchantmentsLootFunction,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)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThenMethods inherited from interface net.minecraft.loot.context.LootContextAware
getRequiredParametersMethods inherited from interface net.minecraft.loot.function.LootFunction
getType
-
Field Details
-
conditions
-
predicate
-
-
Constructor Details
-
ConditionalLootFunction
-
-
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)
-