net.minecraft.enchantment.provider

public record ByCostWithDifficultyEnchantmentProvider

implements EnchantmentProvider

net.minecraft.world.item.enchantment.providers.EnchantmentsByCostWithDifficulty
net.minecraft.class_9744
net.minecraft.enchantment.provider.ByCostWithDifficultyEnchantmentProvider

Field summary

Modifier and TypeField
private final RegistryEntryList<Enchantment>
enchantments
comp_2766
enchantments
private final int
minCost
comp_2767
minCost
private final int
maxCostSpan
comp_2768
maxCostSpan
public static final int
MAX_ALLOWED_VALUE_PART
field_52056
MAX_COST
public static final com.mojang.serialization.MapCodec<ByCostWithDifficultyEnchantmentProvider>
CODEC
field_51733
CODEC

Constructor summary

ModifierConstructor
public (RegistryEntryList<Enchantment> enchantments, int minCost, int maxCostSpan)

Method summary

Modifier and TypeMethod
public void
enchant(ItemStack item, ItemEnchantments$Mutable itemEnchantments, RandomSource random, DifficultyInstance difficulty)
method_60266(class_1799 arg0, class_9304$class_9305 arg1, class_5819 arg2, class_1266 arg3)
provideEnchantments(ItemStack arg0, ItemEnchantmentsComponent$Builder arg1, Random arg2, LocalDifficulty arg3)
public com.mojang.serialization.MapCodec<ByCostWithDifficultyEnchantmentProvider>
codec()
method_60265()
getCodec()
public RegistryEntryList<Enchantment>
enchantments()
comp_2766()
enchantments()
public int
minCost()
comp_2767()
minCost()
public int
maxCostSpan()
comp_2768()
maxCostSpan()
private static com.mojang.datafixers.kinds.App
lambda$static$0(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_60269(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_60269(com.mojang.serialization.codecs.RecordCodecBuilder$Instance instance)