net.minecraft.loot.function

public class EnchantRandomlyLootFunction

extends ConditionalLootFunction

All mapped superinterfaces:

LootFunction, LootContextAware

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
field_1031
LOGGER
public static final com.mojang.serialization.MapCodec<EnchantRandomlyLootFunction>
CODEC
field_45823
CODEC
private final Optional<RegistryEntryList<Enchantment>>
options
field_51792
options
private final boolean
onlyCompatible
field_51793
onlyCompatible

Constructor summary

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

Method summary

Modifier and TypeMethod
public LootFunctionType<EnchantRandomlyLootFunction>
getType()
method_29321()
getType()
public ItemStack
run(ItemStack itemStack, LootContext context)
method_522(class_1799 arg0, class_47 arg1)
process(ItemStack arg0, LootContext arg1)
private static ItemStack
enchantItem(ItemStack itemStack, Holder<Enchantment> enchantment, RandomSource random)
method_26266(class_1799 arg0, class_6880<class_1887> arg1, class_5819 arg2)
addEnchantmentToStack(ItemStack stack, RegistryEntry<Enchantment> enchantment, Random random)
public static EnchantRandomlyLootFunction$Builder
randomEnchantment()
method_35520()
create()
public static EnchantRandomlyLootFunction$Builder
randomApplicableEnchantment(HolderLookup$Provider registries)
method_489(class_7225$class_7874 arg0)
builder(RegistryWrapper$WrapperLookup registries)
private static boolean
lambda$run$4(boolean arg0, ItemStack arg1, Holder arg2)
method_60291(boolean arg0, class_1799 arg1, class_6880 arg2)
method_60291(boolean arg0, ItemStack arg1, RegistryEntry entry)
private static Stream
lambda$run$3(LootContext arg0)
method_60289(class_47 arg0)
method_60289(LootContext arg0)
private static com.mojang.datafixers.kinds.App
lambda$static$2(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_60292(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_60292(com.mojang.serialization.codecs.RecordCodecBuilder$Instance instance)
private static Boolean
lambda$static$1(EnchantRandomlyFunction arg0)
method_60290(class_109 arg0)
method_60290(EnchantRandomlyLootFunction function)
private static Optional
lambda$static$0(EnchantRandomlyFunction arg0)
method_53324(class_109 arg0)
method_53324(EnchantRandomlyLootFunction function)