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

public class SetNameFunction extends LootItemConditionalFunction
LootItemFunction that sets a stack's name. The Component for the name is optionally resolved relative to a given LootContext.EntityTarget for entity-sensitive component data such as scoreboard scores.