Class SetEnchantmentsFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction
- All Implemented Interfaces:
- BiFunction<ItemStack,,- LootContext, - ItemStack> - LootItemFunction,- LootContextUser
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunctionLootItemConditionalFunction.DummyBuilder
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final booleanstatic final com.mojang.serialization.Codec<SetEnchantmentsFunction>private final Map<Holder<Enchantment>,NumberProvider> Fields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunctionpredicates
- 
Constructor SummaryConstructorsConstructorDescriptionSetEnchantmentsFunction(List<LootItemCondition> p_300544_, Map<Holder<Enchantment>, NumberProvider> p_165338_, boolean p_165339_) 
- 
Method SummaryModifier and TypeMethodDescriptionSet<LootContextParam<?>>getType()run(ItemStack p_165346_, LootContext p_165347_) private static voidupdateEnchantment(Map<Enchantment, Integer> p_165356_, Enchantment p_165357_, int p_165358_) Methods inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunctionapply, commonFields, simpleBuilder, validateMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunctionandThen
- 
Field Details- 
CODEC
- 
enchantments
- 
addprivate final boolean add
 
- 
- 
Constructor Details- 
SetEnchantmentsFunctionSetEnchantmentsFunction(List<LootItemCondition> p_300544_, Map<Holder<Enchantment>, NumberProvider> p_165338_, boolean p_165339_) 
 
- 
- 
Method Details- 
getType
- 
getReferencedContextParams
- 
run- Specified by:
- runin class- LootItemConditionalFunction
 
- 
updateEnchantmentprivate static void updateEnchantment(Map<Enchantment, Integer> p_165356_, Enchantment p_165357_, int p_165358_) 
 
-