Class EnchantmentSilkTouch

java.lang.Object
cn.nukkit.item.enchantment.Enchantment
cn.nukkit.item.enchantment.EnchantmentSilkTouch
All Implemented Interfaces:
Cloneable

public class EnchantmentSilkTouch extends Enchantment
Author:
MagicDroidX (Nukkit Project)
  • Constructor Details

    • EnchantmentSilkTouch

      protected EnchantmentSilkTouch()
  • Method Details

    • getMinEnchantAbility

      public int getMinEnchantAbility(int level)
      Description copied from class: Enchantment
      The minimum enchantability for the given level as described in https://minecraft.gamepedia.com/Enchanting/Levels
      Overrides:
      getMinEnchantAbility in class Enchantment
      Parameters:
      level - The level being checked
      Returns:
      The minimum value
    • getMaxEnchantAbility

      public int getMaxEnchantAbility(int level)
      Description copied from class: Enchantment
      The maximum enchantability for the given level as described in https://minecraft.gamepedia.com/Enchanting/Levels
      Overrides:
      getMaxEnchantAbility in class Enchantment
      Parameters:
      level - The level being checked
      Returns:
      The maximum value
    • checkCompatibility

      public boolean checkCompatibility(Enchantment enchantment)
      Description copied from class: Enchantment
      Checks if this enchantment can be applied to an item that have the give enchantment without doing reverse check.
      Overrides:
      checkCompatibility in class Enchantment
      Parameters:
      enchantment - The enchantment to be checked
      Returns:
      If this enchantment is compatible with the other enchantment.
    • canEnchant

      public boolean canEnchant(Item item)
      Description copied from class: Enchantment
      Checks if the given item have a type which is compatible with this enchantment. This method does not check if the item already have incompatible enchantments.
      Overrides:
      canEnchant in class Enchantment
      Parameters:
      item - The item to be checked
      Returns:
      If the type of the item is valid for this enchantment
    • isItemAcceptable

      @PowerNukkitOnly public boolean isItemAcceptable(Item item)
      Description copied from class: Enchantment
      Checks if an item can have this enchantment. It's not strict to the enchantment table.
      Overrides:
      isItemAcceptable in class Enchantment