PocketMine-MP 5.23.3 git-fbaa125d0ce21ffef98fc1630881a92bedfbaa73
Loading...
Searching...
No Matches
pocketmine\item\enchantment\SharpnessEnchantment Class Reference
+ Inheritance diagram for pocketmine\item\enchantment\SharpnessEnchantment:
+ Collaboration diagram for pocketmine\item\enchantment\SharpnessEnchantment:

Public Member Functions

 getDamageBonus (int $enchantmentLevel)
 
 getMaxEnchantingPower (int $level)
 
 getMaxLevel ()
 
 getMinEnchantingPower (int $level)
 
 getName ()
 
 getPrimaryItemFlags ()
 
 getRarity ()
 
 getSecondaryItemFlags ()
 
 hasPrimaryItemType (int $flag)
 
 hasSecondaryItemType (int $flag)
 
 isApplicableTo (Entity $victim)
 
 isCompatibleWith (Enchantment $other)
 
 onPostAttack (Entity $attacker, Entity $victim, int $enchantmentLevel)
 

Detailed Description

Definition at line 28 of file SharpnessEnchantment.php.

Member Function Documentation

◆ getDamageBonus()

pocketmine\item\enchantment\SharpnessEnchantment::getDamageBonus ( int $enchantmentLevel)

Returns the amount of additional damage caused by this enchantment to applicable targets.

Reimplemented from pocketmine\item\enchantment\MeleeWeaponEnchantment.

Definition at line 34 of file SharpnessEnchantment.php.

◆ getMaxEnchantingPower()

pocketmine\item\enchantment\Enchantment::getMaxEnchantingPower ( int $level)
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 157 of file Enchantment.php.

◆ getMaxLevel()

pocketmine\item\enchantment\Enchantment::getMaxLevel ( )
inherited

Returns the maximum level of this enchantment that can be found on an enchantment table.

Definition at line 126 of file Enchantment.php.

◆ getMinEnchantingPower()

pocketmine\item\enchantment\Enchantment::getMinEnchantingPower ( int $level)
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 145 of file Enchantment.php.

◆ getName()

pocketmine\item\enchantment\Enchantment::getName ( )
inherited

Returns a translation key for this enchantment's name.

Definition at line 71 of file Enchantment.php.

◆ getPrimaryItemFlags()

pocketmine\item\enchantment\Enchantment::getPrimaryItemFlags ( )
inherited

Returns a bitset indicating what item types can have this item applied from an enchanting table.

Deprecated
See also
AvailableEnchantmentRegistry::getPrimaryItemTags()

Definition at line 88 of file Enchantment.php.

◆ getRarity()

pocketmine\item\enchantment\Enchantment::getRarity ( )
inherited

Returns an int constant indicating how rare this enchantment type is.

Definition at line 78 of file Enchantment.php.

◆ getSecondaryItemFlags()

pocketmine\item\enchantment\Enchantment::getSecondaryItemFlags ( )
inherited

Returns a bitset indicating what item types cannot have this item applied from an enchanting table, but can from an anvil.

Deprecated
See also
AvailableEnchantmentRegistry::getSecondaryItemTags()

Definition at line 99 of file Enchantment.php.

◆ hasPrimaryItemType()

pocketmine\item\enchantment\Enchantment::hasPrimaryItemType ( int $flag)
inherited

Returns whether this enchantment can apply to the item type from an enchanting table.

Deprecated
See also
AvailableEnchantmentRegistry

Definition at line 109 of file Enchantment.php.

◆ hasSecondaryItemType()

pocketmine\item\enchantment\Enchantment::hasSecondaryItemType ( int $flag)
inherited

Returns whether this enchantment can apply to the item type from an anvil, if it is not a primary item.

Deprecated
See also
AvailableEnchantmentRegistry

Definition at line 119 of file Enchantment.php.

◆ isApplicableTo()

pocketmine\item\enchantment\SharpnessEnchantment::isApplicableTo ( Entity $victim)

Returns whether this melee enchantment has an effect on the target entity. For example, Smite only applies to undead mobs.

Reimplemented from pocketmine\item\enchantment\MeleeWeaponEnchantment.

Definition at line 30 of file SharpnessEnchantment.php.

◆ isCompatibleWith()

pocketmine\item\enchantment\Enchantment::isCompatibleWith ( Enchantment $other)
inherited

Returns whether this enchantment can be applied to the item along with the given enchantment.

Definition at line 133 of file Enchantment.php.

◆ onPostAttack()

pocketmine\item\enchantment\MeleeWeaponEnchantment::onPostAttack ( Entity $attacker,
Entity $victim,
int $enchantmentLevel )
inherited

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.


The documentation for this class was generated from the following file: