Class LootItemConditionalFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
- All Implemented Interfaces:
BiFunction<ItemStack,
,LootContext, ItemStack> LootItemFunction
,LootContextUser
- Direct Known Subclasses:
ApplyBonusCount
,ApplyExplosionDecay
,CopyBlockState
,CopyComponentsFunction
,CopyCustomDataFunction
,CopyNameFunction
,EnchantedCountIncreaseFunction
,EnchantRandomlyFunction
,EnchantWithLevelsFunction
,ExplorationMapFunction
,FillPlayerHead
,FilteredFunction
,FunctionReference
,LimitCount
,ModifyContainerContents
,SetAttributesFunction
,SetBannerPatternFunction
,SetBookCoverFunction
,SetComponentsFunction
,SetContainerContents
,SetContainerLootTable
,SetCustomDataFunction
,SetCustomModelDataFunction
,SetEnchantmentsFunction
,SetFireworkExplosionFunction
,SetFireworksFunction
,SetInstrumentFunction
,SetItemCountFunction
,SetItemDamageFunction
,SetItemFunction
,SetLoreFunction
,SetNameFunction
,SetOminousBottleAmplifierFunction
,SetPotionFunction
,SetStewEffectFunction
,SetWritableBookPagesFunction
,SetWrittenBookPagesFunction
,SmeltItemFunction
,ToggleTooltips
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
(package private) static final class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Predicate
<LootContext> protected final List
<LootItemCondition> -
Constructor Summary
ModifierConstructorDescriptionprotected
LootItemConditionalFunction
(List<LootItemCondition> p_300620_) -
Method Summary
Modifier and TypeMethodDescriptionfinal ItemStack
apply
(ItemStack p_80689_, LootContext p_80690_) protected static <T extends LootItemConditionalFunction>
com.mojang.datafixers.Products.P1<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<T>, List<LootItemCondition>> commonFields
(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<T> p_298596_) abstract LootItemFunctionType
<? extends LootItemConditionalFunction> getType()
protected abstract ItemStack
run
(ItemStack p_80679_, LootContext p_80680_) protected static LootItemConditionalFunction.Builder
<?> simpleBuilder
(Function<List<LootItemCondition>, LootItemFunction> p_80684_) void
validate
(ValidationContext p_80682_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
Methods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser
getReferencedContextParams
-
Field Details
-
predicates
-
compositePredicates
-
-
Constructor Details
-
LootItemConditionalFunction
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceLootItemFunction
-
commonFields
protected static <T extends LootItemConditionalFunction> com.mojang.datafixers.Products.P1<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<T>,List<LootItemCondition>> commonFields(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<T> p_298596_) -
apply
- Specified by:
apply
in interfaceBiFunction<ItemStack,
LootContext, ItemStack>
-
run
-
validate
- Specified by:
validate
in interfaceLootContextUser
-
simpleBuilder
protected static LootItemConditionalFunction.Builder<?> simpleBuilder(Function<List<LootItemCondition>, LootItemFunction> p_80684_)
-