Package net.minecraft.loot.function
Class SetNameLootFunction
java.lang.Object
net.minecraft.loot.function.ConditionalLootFunction
net.minecraft.loot.function.SetNameLootFunction
- All Implemented Interfaces:
BiFunction<ItemStack,LootContext,ItemStack>
,LootContextAware
,LootFunction
public class SetNameLootFunction extends ConditionalLootFunction
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SetNameLootFunction.Serializer
Nested classes/interfaces inherited from class net.minecraft.loot.function.ConditionalLootFunction
ConditionalLootFunction.Builder<T extends ConditionalLootFunction.Builder<T>>, ConditionalLootFunction.Joiner
-
Field Summary
Fields Modifier and Type Field Description private LootContext.EntityTarget
entity
private static Logger
LOGGER
private Text
name
Fields inherited from class net.minecraft.loot.function.ConditionalLootFunction
conditions
-
Constructor Summary
Constructors Modifier Constructor Description private
SetNameLootFunction(LootCondition[] conditions, Text name, LootContext.EntityTarget entity)
-
Method Summary
Modifier and Type Method Description static UnaryOperator<Text>
applySourceEntity(LootContext context, LootContext.EntityTarget sourceEntity)
Set<LootContextParameter<?>>
getRequiredParameters()
LootFunctionType
getType()
ItemStack
process(ItemStack stack, LootContext context)
Methods inherited from class net.minecraft.loot.function.ConditionalLootFunction
apply, builder, 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
-
name
-
entity
-
-
Constructor Details
-
SetNameLootFunction
private SetNameLootFunction(LootCondition[] conditions, @Nullable Text name, @Nullable LootContext.EntityTarget entity)
-
-
Method Details
-
getType
-
getRequiredParameters
-
applySourceEntity
public static UnaryOperator<Text> applySourceEntity(LootContext context, @Nullable LootContext.EntityTarget sourceEntity) -
process
- Specified by:
process
in classConditionalLootFunction
-