net.minecraft.loot.function

public class SetEnchantmentsLootFunction

extends ConditionalLootFunction

All mapped superinterfaces:

LootFunction, LootContextAware, LootTableReportable

net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction
net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction
net.minecraft.class_5642
net.minecraft.loot.function.SetEnchantmentsLootFunction

Field summary

Modifier and TypeField
public static final com.mojang.serialization.MapCodec<SetEnchantmentsLootFunction>
MAP_CODEC
MAP_CODEC
field_45843
CODEC
private final Map<RegistryEntry<Enchantment>, LootNumberProvider>
enchantments
enchantments
field_27907
enchantments
private final boolean
add
add
field_27908
add

Constructor summary

ModifierConstructor
private (List<LootCondition> conditions, Map<RegistryEntry<Enchantment>, LootNumberProvider> enchantments, boolean add)

Method summary

Modifier and TypeMethod
public com.mojang.serialization.MapCodec<SetEnchantmentsLootFunction>
codec()
codec()
method_1_738()
getCodec()
public void
validate(ValidationContext context)
validate(ValidationContext context)
method_292(class_58 arg0)
report(LootTableReporter arg0)
public ItemStack
run(ItemStack itemStack, LootContext context)
run(ItemStack itemStack, LootContext context)
method_522(class_1799 arg0, class_47 arg1)
process(ItemStack arg0, LootContext arg1)