Package net.minecraft.loot.functions
Class SetLore
- java.lang.Object
-
- net.minecraft.loot.LootFunction
-
- net.minecraft.loot.functions.SetLore
-
- All Implemented Interfaces:
java.util.function.BiFunction<ItemStack,LootContext,ItemStack>
,ILootFunction
,IParameterized
public class SetLore extends LootFunction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SetLore.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 java.util.List<ITextComponent>
lore
private boolean
replace
private LootContext.EntityTarget
resolutionContext
-
Fields inherited from class net.minecraft.loot.LootFunction
predicates
-
-
Constructor Summary
Constructors Constructor Description SetLore(ILootCondition[] p_i51220_1_, boolean p_i51220_2_, java.util.List<ITextComponent> p_i51220_3_, LootContext.EntityTarget p_i51220_4_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private ListNBT
getLoreTag(ItemStack p_215942_1_, boolean p_215942_2_)
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
-
replace
private final boolean replace
-
lore
private final java.util.List<ITextComponent> lore
-
resolutionContext
@Nullable private final LootContext.EntityTarget resolutionContext
-
-
Constructor Detail
-
SetLore
public SetLore(ILootCondition[] p_i51220_1_, boolean p_i51220_2_, java.util.List<ITextComponent> p_i51220_3_, @Nullable LootContext.EntityTarget p_i51220_4_)
-
-
Method Detail
-
getType
public LootFunctionType getType()
-
getReferencedContextParams
public java.util.Set<LootParameter<?>> getReferencedContextParams()
-
run
public ItemStack run(ItemStack p_215859_1_, LootContext p_215859_2_)
- Specified by:
run
in classLootFunction
-
-