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 TypeFieldDescriptionprivate static final org.slf4j.Logger
(package private) final Component
(package private) final LootContext.EntityTarget
Fields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
predicates
-
Constructor Summary
ConstructorDescriptionSetNameFunction
(LootItemCondition[] p_81127_, Component p_81128_, LootContext.EntityTarget p_81129_) -
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, 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 -
name
-
resolutionContext
-
-
Constructor Details
-
SetNameFunction
SetNameFunction(LootItemCondition[] p_81127_, @Nullable Component p_81128_, @Nullable LootContext.EntityTarget p_81129_)
-
-
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_)
-