Interface IForgeEnchantment

All Known Implementing Classes:
ArrowInfiniteEnchantment, ArrowPiercingEnchantment, BindingCurseEnchantment, BreachEnchantment, DamageEnchantment, DensityEnchantment, DigDurabilityEnchantment, Enchantment, FrostWalkerEnchantment, LootBonusEnchantment, MendingEnchantment, MultiShotEnchantment, ProtectionEnchantment, SoulSpeedEnchantment, SwiftSneakEnchantment, ThornsEnchantment, TridentRiptideEnchantment, UntouchingEnchantment, VanishingCurseEnchantment, WaterWalkerEnchantment, WindBurstEnchantment

public interface IForgeEnchantment
  • Method Details

    • self

      private Enchantment self()
    • getDamageBonus

      default float getDamageBonus(int level, @Nullable EntityType<?> mobType, ItemStack enchantedItem)
      ItemStack aware version of Enchantment.getDamageBonus(int, MobType)
      Parameters:
      level - the level of the enchantment
      mobType - the mob type being attacked
      enchantedItem - the item used for the attack
      Returns:
      the damage bonus
    • isAllowedOnBooks

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

      default boolean canApplyAtEnchantingTable(ItemStack stack)
      This applies specifically to applying at the enchanting table. The other method
      invalid reference
      #canEnchant(ItemStack)
      applies for all possible enchantments.