Class EnchantmentLoot

java.lang.Object
cn.nukkit.item.enchantment.Enchantment
cn.nukkit.item.enchantment.loot.EnchantmentLoot
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
EnchantmentLootDigging, EnchantmentLootFishing, EnchantmentLootWeapon

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

  • 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.wiki/w/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.wiki/w/Enchanting/Levels
      Overrides:
      getMaxEnchantAbility in class Enchantment
      Parameters:
      level - The level being checked
      Returns:
      The maximum value
    • getMaxLevel

      public int getMaxLevel()
      Description copied from class: Enchantment
      The maximum safe level which is possible with this enchantment.
      Overrides:
      getMaxLevel in class Enchantment
    • 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.