net.minecraft.loot.function

public class SetNameLootFunction

extends ConditionalLootFunction

All mapped superinterfaces:

LootFunction, LootContextAware, LootTableReportable

net.minecraft.world.level.storage.loot.functions.SetNameFunction
net.minecraft.world.level.storage.loot.functions.SetNameFunction
net.minecraft.class_3670
net.minecraft.loot.function.SetNameLootFunction

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
LOGGER
LOGGER
field_16230
LOGGER
public static final com.mojang.serialization.MapCodec<SetNameLootFunction>
MAP_CODEC
MAP_CODEC
field_45848
CODEC
private final Optional<Text>
name
name
field_16228
name
private final Optional<LootContext$EntityReference>
resolutionContext
resolutionContext
field_16229
entity
private final SetNameLootFunction$Target
target
target
field_50208
target

Constructor summary

ModifierConstructor
private (List<LootCondition> conditions, Optional<Text> name, Optional<LootContext$EntityReference> entity, SetNameLootFunction$Target target)

Method summary

Modifier and TypeMethod
public com.mojang.serialization.MapCodec<SetNameLootFunction>
codec()
codec()
method_1_738()
getCodec()
public Set<ContextParameter<?>>
getReferencedContextParams()
getReferencedContextParams()
method_293()
getAllowedParameters()
public static UnaryOperator<Text>
createResolver(LootContext context, LootContext$EntityTarget entityTarget)
createResolver(LootContext context, LootContext$EntityTarget entityTarget)
method_16190(class_47 arg0, class_47$class_50 arg1)
applySourceEntity(LootContext context, LootContext$EntityReference sourceEntity)
public ItemStack
run(ItemStack itemStack, LootContext context)
run(ItemStack itemStack, LootContext context)
method_522(class_1799 arg0, class_47 arg1)
process(ItemStack arg0, LootContext arg1)
public static ConditionalLootFunction$Builder<?>
setName(Component value, SetNameFunction$Target target)
setName(Component value, SetNameFunction$Target target)
method_35549(class_2561 arg0, class_3670$class_9475 arg1)
builder(Text name, SetNameLootFunction$Target target)
public static ConditionalLootFunction$Builder<?>
setName(Component value, SetNameFunction$Target target, LootContext$EntityTarget resolutionContext)
setName(Component value, SetNameFunction$Target target, LootContext$EntityTarget resolutionContext)
method_35550(class_2561 arg0, class_3670$class_9475 arg1, class_47$class_50 arg2)
builder(Text name, SetNameLootFunction$Target target, LootContext$EntityReference entity)