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 Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
LootItemConditionalFunction.DummyBuilder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanstatic final com.mojang.serialization.MapCodec<SetEnchantmentsFunction> private final Map<Holder<Enchantment>, NumberProvider> Fields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
predicates -
Constructor Summary
ConstructorsConstructorDescriptionSetEnchantmentsFunction(List<LootItemCondition> p_300544_, Map<Holder<Enchantment>, NumberProvider> p_165338_, boolean p_165339_) -
Method Summary
Modifier and TypeMethodDescriptionSet<LootContextParam<?>> getType()run(ItemStack p_165346_, LootContext p_165347_) Methods inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
apply, commonFields, simpleBuilder, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
CODEC
-
enchantments
-
add
private final boolean add
-
-
Constructor Details
-
SetEnchantmentsFunction
SetEnchantmentsFunction(List<LootItemCondition> p_300544_, Map<Holder<Enchantment>, NumberProvider> p_165338_, boolean p_165339_)
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceLootItemFunction- Specified by:
getTypein classLootItemConditionalFunction
-
getReferencedContextParams
-
run
- Specified by:
runin classLootItemConditionalFunction
-