Class CopyComponentsFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction
- All Implemented Interfaces:
BiFunction<ItemStack,
,LootContext, ItemStack> LootItemFunction
,LootContextUser
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
Nested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
LootItemConditionalFunction.DummyBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Predicate
<DataComponentType<?>> static final com.mojang.serialization.MapCodec
<CopyComponentsFunction> private final Optional
<List<DataComponentType<?>>> private final Optional
<List<DataComponentType<?>>> private final CopyComponentsFunction.Source
Fields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
predicates
-
Constructor Summary
ConstructorDescriptionCopyComponentsFunction
(List<LootItemCondition> p_332739_, CopyComponentsFunction.Source p_333486_, Optional<List<DataComponentType<?>>> p_332029_, Optional<List<DataComponentType<?>>> p_329656_) -
Method Summary
Modifier and TypeMethodDescriptioncopyComponents
(CopyComponentsFunction.Source p_331082_) Set
<LootContextParam<?>> getType()
run
(ItemStack p_329465_, LootContext p_328771_) Methods inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
apply, commonFields, simpleBuilder, validate
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
-
Field Details
-
CODEC
-
source
-
include
-
exclude
-
bakedPredicate
-
-
Constructor Details
-
CopyComponentsFunction
CopyComponentsFunction(List<LootItemCondition> p_332739_, CopyComponentsFunction.Source p_333486_, Optional<List<DataComponentType<?>>> p_332029_, Optional<List<DataComponentType<?>>> p_329656_)
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceLootItemFunction
- Specified by:
getType
in classLootItemConditionalFunction
-
getReferencedContextParams
-
run
- Specified by:
run
in classLootItemConditionalFunction
-
copyComponents
public static CopyComponentsFunction.Builder copyComponents(CopyComponentsFunction.Source p_331082_)
-