public class SetNameLootFunction extends ConditionalLootFunction
Modifier and Type | Class and Description |
---|---|
static class |
SetNameLootFunction.Serializer |
ConditionalLootFunction.Builder<T extends ConditionalLootFunction.Builder<T>>, ConditionalLootFunction.Joiner
Modifier and Type | Field and Description |
---|---|
private LootContext.EntityTarget |
entity |
private static Logger |
LOGGER |
private Text |
name |
conditions
Modifier | Constructor and Description |
---|---|
private |
SetNameLootFunction(LootCondition[] conditions,
Text name,
LootContext.EntityTarget entity) |
Modifier and Type | Method and Description |
---|---|
static UnaryOperator<Text> |
applySourceEntity(LootContext context,
LootContext.EntityTarget sourceEntity) |
Set<LootContextParameter<?>> |
getRequiredParameters() |
LootFunctionType |
getType() |
ItemStack |
process(ItemStack stack,
LootContext context) |
apply, builder, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
andThen
private static final Logger LOGGER
private final Text name
@Nullable private final LootContext.EntityTarget entity
private SetNameLootFunction(LootCondition[] conditions, @Nullable Text name, @Nullable LootContext.EntityTarget entity)
public LootFunctionType getType()
public Set<LootContextParameter<?>> getRequiredParameters()
public static UnaryOperator<Text> applySourceEntity(LootContext context, @Nullable LootContext.EntityTarget sourceEntity)
public ItemStack process(ItemStack stack, LootContext context)
process
in class ConditionalLootFunction