net.minecraft.loot.function

public class EnchantRandomlyLootFunction

extends ConditionalLootFunction

All mapped superinterfaces:

LootFunction, LootContextAware, LootTableReportable

net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction
net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction
net.minecraft.class_109
net.minecraft.loot.function.EnchantRandomlyLootFunction

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
LOGGER
LOGGER
field_1031
LOGGER
public static final com.mojang.serialization.MapCodec<EnchantRandomlyLootFunction>
MAP_CODEC
MAP_CODEC
field_45823
CODEC
private final Optional<RegistryEntryList<Enchantment>>
options
options
field_51792
options
private final boolean
onlyCompatible
onlyCompatible
field_51793
onlyCompatible
private final boolean
includeAdditionalCostComponent
includeAdditionalCostComponent
field_1_818
includeAdditionalCostComponent

Constructor summary

ModifierConstructor
private (List<LootCondition> conditions, Optional<RegistryEntryList<Enchantment>> options, boolean onlyCompatible, boolean includeAdditionalCostComponent)

Method summary

Modifier and TypeMethod
public com.mojang.serialization.MapCodec<EnchantRandomlyLootFunction>
codec()
codec()
method_1_738()
getCodec()
public Set<ContextParameter<?>>
getReferencedContextParams()
getReferencedContextParams()
method_293()
getAllowedParameters()
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)
private ItemStack
enchantItem(ItemStack itemStack, Holder<Enchantment> enchantment, LootContext context)
enchantItem(ItemStack itemStack, Holder<Enchantment> enchantment, LootContext context)
method_1_760(class_1799 arg0, class_6880<class_1887> arg1, class_47 arg2)
enchant(ItemStack stack, RegistryEntry<Enchantment> enchantment, LootContext context)
public static EnchantRandomlyLootFunction$Builder
randomEnchantment()
randomEnchantment()
method_35520()
create()
public static EnchantRandomlyLootFunction$Builder
randomApplicableEnchantment(HolderLookup$Provider registries)
randomApplicableEnchantment(HolderLookup$Provider registries)
method_489(class_7225$class_7874 arg0)
builder(RegistryWrapper$WrapperLookup registries)