Interface IEnchantmentExtension

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 IEnchantmentExtension
  • Method Details

    • self

      private Enchantment self()
    • getDamageBonus

      default float getDamageBonus(int level, EntityType<?> entityType, ItemStack enchantedItem)
      Parameters:
      level - the level of the enchantment
      entityType - the entity type being attacked
      enchantedItem - the item used for the attack
      Returns:
      the damage bonus
    • allowedInCreativeTab

      default boolean allowedInCreativeTab(Item book, Set<TagKey<Item>> allowedCategories)
      Determines whether item variants of this enchantment can be added to a given creative tab with the allowed categories.
      Parameters:
      book - the item being added to the creative tab
      allowedCategories - the enchantment categories allowed in the creative tab
      Returns:
      whether item variants of this enchantment can be added to a given creative tab with the allowed categories