Class SetLoreFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetLoreFunction
- All Implemented Interfaces:
BiFunction<ItemStack, LootContext, ItemStack>, LootItemFunction, LootContextUser, Validatable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MapCodec<SetLoreFunction> private final ListOperationprivate final Optional<LootContext.EntityTarget> Fields inherited from class LootItemConditionalFunction
predicates -
Constructor Summary
ConstructorsConstructorDescriptionSetLoreFunction(List<LootItemCondition> predicates, List<Component> lore, ListOperation mode, Optional<LootContext.EntityTarget> resolutionContext) -
Method Summary
Modifier and TypeMethodDescriptioncodec()Set<ContextKey<?>> run(ItemStack itemStack, LootContext context) static SetLoreFunction.BuildersetLore()updateLore(@Nullable ItemLore itemLore, LootContext context) Methods inherited from class LootItemConditionalFunction
apply, commonFields, simpleBuilder, validateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThen
-
Field Details
-
MAP_CODEC
-
lore
-
mode
-
resolutionContext
-
-
Constructor Details
-
SetLoreFunction
public SetLoreFunction(List<LootItemCondition> predicates, List<Component> lore, ListOperation mode, Optional<LootContext.EntityTarget> resolutionContext)
-
-
Method Details
-
codec
- Specified by:
codecin interfaceLootItemFunction- Specified by:
codecin classLootItemConditionalFunction
-
getReferencedContextParams
-
run
- Specified by:
runin classLootItemConditionalFunction
-
updateLore
-
setLore
-