Package net.minecraft.loot.functions
Class SetName
- java.lang.Object
-
- net.minecraft.loot.LootFunction
-
- net.minecraft.loot.functions.SetName
-
- All Implemented Interfaces:
java.util.function.BiFunction<ItemStack,LootContext,ItemStack>
,ILootFunction
,IParameterized
public class SetName extends LootFunction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SetName.Serializer
-
Nested classes/interfaces inherited from class net.minecraft.loot.LootFunction
LootFunction.Builder<T extends LootFunction.Builder<T>>
-
Nested classes/interfaces inherited from interface net.minecraft.loot.functions.ILootFunction
ILootFunction.IBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.logging.log4j.Logger
LOGGER
private ITextComponent
name
private LootContext.EntityTarget
resolutionContext
-
Fields inherited from class net.minecraft.loot.LootFunction
predicates
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SetName(ILootCondition[] p_i51218_1_, ITextComponent p_i51218_2_, LootContext.EntityTarget p_i51218_3_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.function.UnaryOperator<ITextComponent>
createResolver(LootContext p_215936_0_, LootContext.EntityTarget p_215936_1_)
java.util.Set<LootParameter<?>>
getReferencedContextParams()
LootFunctionType
getType()
ItemStack
run(ItemStack p_215859_1_, LootContext p_215859_2_)
-
Methods inherited from class net.minecraft.loot.LootFunction
apply, simpleBuilder, validate
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
name
private final ITextComponent name
-
resolutionContext
@Nullable private final LootContext.EntityTarget resolutionContext
-
-
Constructor Detail
-
SetName
private SetName(ILootCondition[] p_i51218_1_, @Nullable ITextComponent p_i51218_2_, @Nullable LootContext.EntityTarget p_i51218_3_)
-
-
Method Detail
-
getType
public LootFunctionType getType()
-
getReferencedContextParams
public java.util.Set<LootParameter<?>> getReferencedContextParams()
-
createResolver
public static java.util.function.UnaryOperator<ITextComponent> createResolver(LootContext p_215936_0_, @Nullable LootContext.EntityTarget p_215936_1_)
-
run
public ItemStack run(ItemStack p_215859_1_, LootContext p_215859_2_)
- Specified by:
run
in classLootFunction
-
-