net.minecraft.world.level.storage.loot.functions

public class EnchantRandomlyFunction

extends LootItemConditionalFunction

All mapped superinterfaces:

LootItemFunction, LootContextUser

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

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
b
LOGGER
field_1031
LOGGER
public static final com.mojang.serialization.MapCodec<EnchantRandomlyFunction>
a
CODEC
field_45823
CODEC
private final Optional<HolderSet<Enchantment>>
c
options
field_51792
options
private final boolean
d
onlyCompatible
field_51793
onlyCompatible

Constructor summary

ModifierConstructor
(List<LootItemCondition> conditions, Optional<HolderSet<Enchantment>> options, boolean onlyCompatible)

Method summary

Modifier and TypeMethod
public LootItemFunctionType<EnchantRandomlyFunction>
b()
getType()
method_29321()
getType()
public ItemStack
a(cxp arg0, ewp arg1)
run(ItemStack arg0, LootContext arg1)
method_522(class_1799 arg0, class_47 arg1)
process(ItemStack arg0, LootContext arg1)
private static ItemStack
a(cxp arg0, jq<ddz> arg1, bam arg2)
enchantItem(ItemStack arg0, Holder<Enchantment> arg1, RandomSource arg2)
method_26266(class_1799 arg0, class_6880<class_1887> arg1, class_5819 arg2)
addEnchantmentToStack(ItemStack stack, RegistryEntry<Enchantment> enchantment, Random random)
public static EnchantRandomlyFunction$Builder
c()
randomEnchantment()
method_35520()
create()
public static EnchantRandomlyFunction$Builder
a(js$a arg0)
randomApplicableEnchantment(HolderLookup$Provider arg0)
method_489(class_7225$class_7874 arg0)
builder(RegistryWrapper$WrapperLookup registries)