Class Enchantment

    • Method Detail

      • byId

        @Nullable
        public static Enchantment byId​(int p_185262_0_)
      • getMinLevel

        public int getMinLevel()
      • getMaxLevel

        public int getMaxLevel()
      • getMinCost

        public int getMinCost​(int p_77321_1_)
      • getMaxCost

        public int getMaxCost​(int p_223551_1_)
      • getDamageProtection

        public int getDamageProtection​(int p_77318_1_,
                                       DamageSource p_77318_2_)
      • getDamageBonus

        public float getDamageBonus​(int p_152376_1_,
                                    CreatureAttribute p_152376_2_)
      • isCompatibleWith

        public final boolean isCompatibleWith​(Enchantment p_191560_1_)
      • checkCompatibility

        protected boolean checkCompatibility​(Enchantment p_77326_1_)
      • getOrCreateDescriptionId

        protected java.lang.String getOrCreateDescriptionId()
      • getDescriptionId

        public java.lang.String getDescriptionId()
      • getFullname

        public ITextComponent getFullname​(int p_200305_1_)
      • canEnchant

        public boolean canEnchant​(ItemStack p_92089_1_)
      • doPostAttack

        public void doPostAttack​(LivingEntity p_151368_1_,
                                 Entity p_151368_2_,
                                 int p_151368_3_)
      • doPostHurt

        public void doPostHurt​(LivingEntity p_151367_1_,
                               Entity p_151367_2_,
                               int p_151367_3_)
      • 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 #canApply(ItemStack) applies for all possible enchantments.
        Parameters:
        stack -
        Returns:
      • isAllowedOnBooks

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