mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 07:39:42 +00:00
phpdoc armageddon for master, pass 1
This commit is contained in:
@@ -36,13 +36,6 @@ class ProtectionEnchantment extends Enchantment{
|
||||
/**
|
||||
* ProtectionEnchantment constructor.
|
||||
*
|
||||
* @param int $id
|
||||
* @param string $name
|
||||
* @param int $rarity
|
||||
* @param int $primaryItemFlags
|
||||
* @param int $secondaryItemFlags
|
||||
* @param int $maxLevel
|
||||
* @param float $typeModifier
|
||||
* @param int[]|null $applicableDamageTypes EntityDamageEvent::CAUSE_* constants which this enchantment type applies to, or null if it applies to all types of damage.
|
||||
*/
|
||||
public function __construct(int $id, string $name, int $rarity, int $primaryItemFlags, int $secondaryItemFlags, int $maxLevel, float $typeModifier, ?array $applicableDamageTypes){
|
||||
@@ -56,7 +49,6 @@ class ProtectionEnchantment extends Enchantment{
|
||||
|
||||
/**
|
||||
* Returns the multiplier by which this enchantment type's EPF increases with each enchantment level.
|
||||
* @return float
|
||||
*/
|
||||
public function getTypeModifier() : float{
|
||||
return $this->typeModifier;
|
||||
@@ -64,10 +56,6 @@ class ProtectionEnchantment extends Enchantment{
|
||||
|
||||
/**
|
||||
* Returns the base EPF this enchantment type offers for the given enchantment level.
|
||||
*
|
||||
* @param int $level
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getProtectionFactor(int $level) : int{
|
||||
return (int) floor((6 + $level ** 2) * $this->typeModifier / 3);
|
||||
@@ -75,10 +63,6 @@ class ProtectionEnchantment extends Enchantment{
|
||||
|
||||
/**
|
||||
* Returns whether this enchantment type offers protection from the specified damage source's cause.
|
||||
*
|
||||
* @param EntityDamageEvent $event
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isApplicable(EntityDamageEvent $event) : bool{
|
||||
return $this->applicableDamageTypes === null or isset($this->applicableDamageTypes[$event->getCause()]);
|
||||
|
Reference in New Issue
Block a user