类 Enchantment

java.lang.Object
net.minecraft.world.item.enchantment.Enchantment
所有已实现的接口:
IForgeEnchantment
直接已知子类:
ArrowDamageEnchantment, ArrowFireEnchantment, ArrowInfiniteEnchantment, ArrowKnockbackEnchantment, ArrowPiercingEnchantment, BindingCurseEnchantment, DamageEnchantment, DigDurabilityEnchantment, DiggingEnchantment, FireAspectEnchantment, FishingSpeedEnchantment, FrostWalkerEnchantment, KnockbackEnchantment, LootBonusEnchantment, MendingEnchantment, MultiShotEnchantment, OxygenEnchantment, ProtectionEnchantment, QuickChargeEnchantment, SoulSpeedEnchantment, SweepingEdgeEnchantment, SwiftSneakEnchantment, ThornsEnchantment, TridentChannelingEnchantment, TridentImpalerEnchantment, TridentLoyaltyEnchantment, TridentRiptideEnchantment, UntouchingEnchantment, VanishingCurseEnchantment, WaterWalkerEnchantment, WaterWorkerEnchantment

public abstract class Enchantment extends Object implements IForgeEnchantment
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • byId

      @Nullable public static Enchantment byId(int pId)
    • getSlotItems

      public Map<EquipmentSlot,ItemStack> getSlotItems(LivingEntity pEntity)
    • getRarity

      public Enchantment.Rarity getRarity()
    • getMinLevel

      public int getMinLevel()
    • getMaxLevel

      public int getMaxLevel()
    • getMinCost

      public int getMinCost(int pLevel)
    • getMaxCost

      public int getMaxCost(int pLevel)
    • getDamageProtection

      public int getDamageProtection(int pLevel, DamageSource pSource)
    • getDamageBonus

      @Deprecated public float getDamageBonus(int pLevel, MobType pType)
      已过时。
    • isCompatibleWith

      public final boolean isCompatibleWith(Enchantment pOther)
    • checkCompatibility

      protected boolean checkCompatibility(Enchantment pOther)
    • getOrCreateDescriptionId

      protected String getOrCreateDescriptionId()
    • getDescriptionId

      public String getDescriptionId()
    • getFullname

      public Component getFullname(int pLevel)
    • canEnchant

      public boolean canEnchant(ItemStack pStack)
    • doPostAttack

      public void doPostAttack(LivingEntity pAttacker, Entity pTarget, int pLevel)
    • doPostHurt

      public void doPostHurt(LivingEntity pTarget, Entity pAttacker, int pLevel)
    • isTreasureOnly

      public boolean isTreasureOnly()
    • isCurse

      public boolean isCurse()
    • isTradeable

      public boolean isTradeable()
    • isDiscoverable

      public boolean isDiscoverable()
    • canApplyAtEnchantingTable

      public boolean canApplyAtEnchantingTable(ItemStack stack)
      This applies specifically to applying at the enchanting table. The other method canEnchant(ItemStack) applies for all possible enchantments.
      参数:
      stack -
      返回:
    • isAllowedOnBooks

      public boolean isAllowedOnBooks()
      Is this enchantment allowed to be enchanted on books via Enchantment Table
      返回:
      false to disable the vanilla feature