Class SetContainerContents
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetContainerContents
- All Implemented Interfaces:
BiFunction<ItemStack, LootContext, ItemStack>, LootItemFunction, LootContextUser, Validatable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ContainerComponentManipulator<?> private final List<LootPoolEntryContainer> static final MapCodec<SetContainerContents> Fields inherited from class LootItemConditionalFunction
predicates -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSetContainerContents(List<LootItemCondition> predicates, ContainerComponentManipulator<?> component, List<LootPoolEntryContainer> entries) -
Method Summary
Modifier and TypeMethodDescriptioncodec()run(ItemStack itemStack, LootContext context) static SetContainerContents.BuildersetContents(ContainerComponentManipulator<?> component) voidvalidate(ValidationContext context) Methods inherited from class LootItemConditionalFunction
apply, commonFields, simpleBuilderMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThenMethods inherited from interface LootContextUser
getReferencedContextParams
-
Field Details
-
MAP_CODEC
-
component
-
entries
-
-
Constructor Details
-
SetContainerContents
private SetContainerContents(List<LootItemCondition> predicates, ContainerComponentManipulator<?> component, List<LootPoolEntryContainer> entries)
-
-
Method Details
-
codec
- Specified by:
codecin interfaceLootItemFunction- Specified by:
codecin classLootItemConditionalFunction
-
run
- Specified by:
runin classLootItemConditionalFunction
-
validate
- Specified by:
validatein interfaceLootContextUser- Specified by:
validatein interfaceValidatable- Overrides:
validatein classLootItemConditionalFunction
-
setContents
-