PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
|
Public Member Functions | |
getDamageBonus (int $enchantmentLevel) | |
getMaxEnchantingPower (int $level) | |
getMaxLevel () | |
getMinEnchantingPower (int $level) | |
getName () | |
getRarity () | |
isApplicableTo (Entity $victim) | |
isCompatibleWith (Enchantment $other) | |
onPostAttack (Entity $attacker, Entity $victim, int $enchantmentLevel) | |
Classes extending this class can be applied to weapons and activate when used by a mob to attack another mob in melee combat.
Definition at line 32 of file MeleeWeaponEnchantment.php.
|
abstract |
Returns the amount of additional damage caused by this enchantment to applicable targets.
Reimplemented in pocketmine\item\enchantment\FireAspectEnchantment, pocketmine\item\enchantment\KnockbackEnchantment, and pocketmine\item\enchantment\SharpnessEnchantment.
|
inherited |
Returns the maximum enchanting power value allowed for the particular level of the enchantment to be available in an enchanting table.
Enchanting power is a random value based on the number of bookshelves around an enchanting table and the enchantability of the item being enchanted. It is only used when determining the available enchantments for the enchantment options.
Definition at line 112 of file Enchantment.php.
|
inherited |
Returns the maximum level of this enchantment that can be found on an enchantment table.
Definition at line 81 of file Enchantment.php.
|
inherited |
Returns the minimum enchanting power value required for the particular level of the enchantment to be available in an enchanting table.
Enchanting power is a random value based on the number of bookshelves around an enchanting table and the enchantability of the item being enchanted. It is only used when determining the available enchantments for the enchantment options.
Definition at line 100 of file Enchantment.php.
|
inherited |
Returns a translation key for this enchantment's name.
Definition at line 67 of file Enchantment.php.
|
inherited |
Returns an int constant indicating how rare this enchantment type is.
Definition at line 74 of file Enchantment.php.
|
abstract |
Returns whether this melee enchantment has an effect on the target entity. For example, Smite only applies to undead mobs.
Reimplemented in pocketmine\item\enchantment\FireAspectEnchantment, pocketmine\item\enchantment\KnockbackEnchantment, and pocketmine\item\enchantment\SharpnessEnchantment.
|
inherited |
Returns whether this enchantment can be applied to the item along with the given enchantment.
Definition at line 88 of file Enchantment.php.
pocketmine\item\enchantment\MeleeWeaponEnchantment::onPostAttack | ( | Entity | $attacker, |
Entity | $victim, | ||
int | $enchantmentLevel ) |
Called after damaging the entity to apply any post damage effects to the target.
Reimplemented in pocketmine\item\enchantment\FireAspectEnchantment, and pocketmine\item\enchantment\KnockbackEnchantment.
Definition at line 48 of file MeleeWeaponEnchantment.php.