Class SetNameFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetNameFunction
- All Implemented Interfaces:
BiFunction<ItemStack,
,LootContext, ItemStack> LootItemFunction
,LootContextUser
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
LootItemConditionalFunction.Builder<T extends LootItemConditionalFunction.Builder<T>>, LootItemConditionalFunction.DummyBuilder
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SetNameFunction>
private static final org.slf4j.Logger
private final Optional<LootContext.EntityTarget>
Fields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
predicates
-
Constructor Summary
ModifierConstructorDescriptionprivate
SetNameFunction
(List<LootItemCondition> p_299241_, Optional<Component> p_298804_, Optional<LootContext.EntityTarget> p_298545_) -
Method Summary
Modifier and TypeMethodDescriptionstatic UnaryOperator<Component>
createResolver
(LootContext p_81140_, LootContext.EntityTarget p_81141_) Set<LootContextParam<?>>
getType()
run
(ItemStack p_81137_, LootContext p_81138_) static LootItemConditionalFunction.Builder<?>
static LootItemConditionalFunction.Builder<?>
setName
(Component p_165460_, LootContext.EntityTarget p_165461_) 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
-
LOGGER
private static final org.slf4j.Logger LOGGER -
CODEC
-
name
-
resolutionContext
-
-
Constructor Details
-
SetNameFunction
private SetNameFunction(List<LootItemCondition> p_299241_, Optional<Component> p_298804_, Optional<LootContext.EntityTarget> p_298545_)
-
-
Method Details
-
getType
-
getReferencedContextParams
-
createResolver
public static UnaryOperator<Component> createResolver(LootContext p_81140_, @Nullable LootContext.EntityTarget p_81141_) -
run
- Specified by:
run
in classLootItemConditionalFunction
-
setName
-
setName
public static LootItemConditionalFunction.Builder<?> setName(Component p_165460_, LootContext.EntityTarget p_165461_)
-