net.minecraft.world.item.enchantment

public class Enchantment

implements FeatureElement

dac
net.minecraft.world.item.enchantment.Enchantment
net.minecraft.class_1887
net.minecraft.enchantment.Enchantment
net.minecraft.src.C_1505_
net.minecraft.world.item.enchantment.Enchantment

Field summary

Modifier and TypeField
private final Enchantment$EnchantmentDefinition
b
definition
field_50013
properties
f_316889_
protected String
a
descriptionId
field_9084
translationKey
f_44673_
private final Holder$Reference<Enchantment>
c
builtInRegistryHolder
field_45769
registryEntry
f_290638_

Constructor summary

ModifierConstructor
public (Enchantment$EnchantmentDefinition properties)

Method summary

Modifier and TypeMethod
public static Enchantment$Cost
a(int arg0)
constantCost(int arg0)
method_58440(int arg0)
constantCost(int base)
m_322287_(int p_334530_)
public static Enchantment$Cost
a(int arg0, int arg1)
dynamicCost(int arg0, int arg1)
method_58441(int arg0, int arg1)
leveledCost(int base, int perLevel)
m_318803_(int p_334326_, int p_335507_)
public static Enchantment$EnchantmentDefinition
a(axf<cum> arg0, axf<cum> arg1, int arg2, int arg3, dac$a arg4, dac$a arg5, int arg6, btd... arg7)
definition(TagKey<Item> arg0, TagKey<Item> arg1, int arg2, int arg3, Enchantment$Cost arg4, Enchantment$Cost arg5, int arg6, EquipmentSlot... arg7)
method_58443(class_6862<class_1792> arg0, class_6862<class_1792> arg1, int arg2, int arg3, class_1887$class_9426 arg4, class_1887$class_9426 arg5, int arg6, class_1304... arg7)
properties(TagKey<Item> supportedItems, TagKey<Item> primaryItems, int weight, int maxLevel, Enchantment$Cost minCost, Enchantment$Cost maxCost, int anvilCost, EquipmentSlot... slots)
m_322764_(C_203208_<C_1381_> p_329090_, C_203208_<C_1381_> p_332240_, int p_328611_, int p_336009_, C_1505_$C_313532_ p_330605_, C_1505_$C_313532_ p_333983_, int p_327771_, C_516_... p_329538_)
public static Enchantment$EnchantmentDefinition
a(axf<cum> arg0, int arg1, int arg2, dac$a arg3, dac$a arg4, int arg5, btd... arg6)
definition(TagKey<Item> arg0, int arg1, int arg2, Enchantment$Cost arg3, Enchantment$Cost arg4, int arg5, EquipmentSlot... arg6)
method_58442(class_6862<class_1792> arg0, int arg1, int arg2, class_1887$class_9426 arg3, class_1887$class_9426 arg4, int arg5, class_1304... arg6)
properties(TagKey<Item> supportedItems, int weight, int maxLevel, Enchantment$Cost minCost, Enchantment$Cost maxCost, int anvilCost, EquipmentSlot... slots)
m_324539_(C_203208_<C_1381_> p_334656_, int p_335023_, int p_332990_, C_1505_$C_313532_ p_328936_, C_1505_$C_313532_ p_332239_, int p_332354_, C_516_... p_334822_)
public static Enchantment$EnchantmentDefinition
a(axf<cum> arg0, int arg1, int arg2, dac$a arg3, dac$a arg4, int arg5, cpn arg6, btd... arg7)
definition(TagKey<Item> arg0, int arg1, int arg2, Enchantment$Cost arg3, Enchantment$Cost arg4, int arg5, FeatureFlagSet arg6, EquipmentSlot... arg7)
method_58674(class_6862<class_1792> arg0, int arg1, int arg2, class_1887$class_9426 arg3, class_1887$class_9426 arg4, int arg5, class_7699 arg6, class_1304... arg7)
properties(TagKey<Item> supportedItems, int weight, int maxLevel, Enchantment$Cost minCost, Enchantment$Cost maxCost, int anvilCost, FeatureSet requiredFeatures, EquipmentSlot... slots)
m_319628_(C_203208_<C_1381_> p_335329_, int p_329635_, int p_331888_, C_1505_$C_313532_ p_328182_, C_1505_$C_313532_ p_328787_, int p_333931_, C_243488_ p_330633_, C_516_... p_330676_)
public static Enchantment
b(int arg0)
byId(int arg0)
method_8191(int arg0)
byRawId(int id)
m_44697_(int p_44698_)
public Map<EquipmentSlot, ItemStack>
a(btr arg0)
getSlotItems(LivingEntity arg0)
method_8185(class_1309 arg0)
getEquipment(LivingEntity entity)
m_44684_(C_524_ arg0)
public final TagKey<Item>
c()
getSupportedItems()
method_56109()
getApplicableItems()
m_318986_()
public final boolean
a(cur arg0)
isPrimaryItem(ItemStack arg0)
method_58444(class_1799 arg0)
isPrimaryItem(ItemStack stack)
m_320566_(C_1391_ arg0)
public final int
d()
getWeight()
method_58445()
getWeight()
m_322444_()
public final int
e()
getAnvilCost()
method_58446()
getAnvilCost()
m_320305_()
public final int
f()
getMinLevel()
method_8187()
getMinLevel()
m_44702_()
public final int
g()
getMaxLevel()
method_8183()
getMaxLevel()
m_6586_()
public final int
c(int arg0)
getMinCost(int arg0)
method_8182(int arg0)
getMinPower(int level)
m_6183_(int arg0)
public final int
d(int arg0)
getMaxCost(int arg0)
method_20742(int arg0)
getMaxPower(int level)
m_6175_(int arg0)
public int
a(int arg0, brp arg1)
getDamageProtection(int arg0, DamageSource arg1)
method_8181(int arg0, class_1282 arg1)
getProtectionAmount(int level, DamageSource source)
m_7205_(int p_44681_, C_489_ arg1)
public float
a(int arg0, btc<?> arg1)
getDamageBonus(int arg0, EntityType<?> arg1)
method_8196(int arg0, class_1299<?> arg1)
getAttackDamage(int level, EntityType<?> entityType)
m_7335_(int p_331633_, C_513_<?> arg1)
public final boolean
b(dac arg0)
isCompatibleWith(Enchantment arg0)
method_8188(class_1887 arg0)
canCombine(Enchantment other)
m_44695_(C_1505_ arg0)
protected boolean
a(dac arg0)
checkCompatibility(Enchantment arg0)
method_8180(class_1887 arg0)
canAccept(Enchantment other)
m_5975_(C_1505_ arg0)
protected String
h()
getOrCreateDescriptionId()
method_8190()
getOrCreateTranslationKey()
m_44703_()
public String
j()
getDescriptionId()
method_8184()
getTranslationKey()
m_44704_()
public Component
e(int arg0)
getFullname(int arg0)
method_8179(int arg0)
getName(int level)
m_44700_(int arg0)
public boolean
b(cur arg0)
canEnchant(ItemStack arg0)
method_8192(class_1799 arg0)
isAcceptableItem(ItemStack stack)
m_6081_(C_1391_ arg0)
public void
a(btr arg0, bsw arg1, int arg2)
doPostAttack(LivingEntity arg0, Entity arg1, int arg2)
method_8189(class_1309 arg0, class_1297 arg1, int arg2)
onTargetDamaged(LivingEntity user, Entity target, int level)
m_7677_(C_524_ p_44687_, C_507_ p_44688_, int arg2)
public void
b(btr arg0, bsw arg1, int arg2)
doPostHurt(LivingEntity arg0, Entity arg1, int arg2)
method_8178(class_1309 arg0, class_1297 arg1, int arg2)
onUserDamaged(LivingEntity user, Entity attacker, int level)
m_7675_(C_524_ p_44693_, C_507_ p_44694_, int arg2)
public void
c(btr arg0, bsw arg1, int arg2)
doPostItemStackHurt(LivingEntity arg0, Entity arg1, int arg2)
method_58675(class_1309 arg0, class_1297 arg1, int arg2)
onAttack(LivingEntity attacket, Entity target, int level)
m_320095_(C_524_ p_329978_, C_507_ p_331186_, int arg2)
public boolean
a()
isTreasureOnly()
method_8193()
isTreasure()
m_6591_()
public boolean
b()
isCurse()
method_8195()
isCursed()
m_6589_()
public boolean
k()
isTradeable()
method_25949()
isAvailableForEnchantedBookOffer()
m_6594_()
public boolean
l()
isDiscoverable()
method_25950()
isAvailableForRandomSelection()
m_6592_()
public Holder$Reference<Enchantment>
m()
builtInRegistryHolder()
method_53216()
getRegistryEntry()
m_292589_()
public FeatureFlagSet
i()
requiredFeatures()
method_45322()
getRequiredFeatures()
m_245183_()