Mace 5.46.0
Extends Tool
A heavy weapon whose smash attack (hitting while falling) deals more damage the further the attacker fell.
Vanilla (https://minecraft.wiki/w/Mace): 6 attack damage, 500 durability on Java and 501 on Bedrock, repaired with breeze rods, enchantability 15, no attack cooldown on Bedrock. Smash attack: when falling more than 1.5 blocks, +4 damage per block for the first 3 blocks, +2 per block for the next 5 and +1 per block beyond that; Density adds 0.5 per block per level. A smash resets the attacker's fall distance and knocks back entities around the target; Wind Burst then launches the attacker. Unlike Java, Bedrock also smashes while gliding with an elytra; creative flight doesn't fall, so it never smashes.
Constants
BREACH_ARMOR_REDUCTION_PER_LEVEL
public const BREACH_ARMOR_REDUCTION_PER_LEVEL = 0.15Breach: armor effectiveness lost per level (15 percentage points).
HEAVY_SMASH_FALL_DISTANCE
public const HEAVY_SMASH_FALL_DISTANCE = 5.0Fall distance above which the smash is "heavy" (stronger area knockback, heavy sound).
SMASH_KNOCKBACK_RADIUS
public const SMASH_KNOCKBACK_RADIUS = 3.5Radius around the target in which other entities are knocked back by a smash (Java MaceItem).
SMASH_MIN_FALL_DISTANCE
public const SMASH_MIN_FALL_DISTANCE = 1.5WIND_BURST_RADIUS
public const WIND_BURST_RADIUS = 3.5Wind Burst: burst radius (Java WindBurst enchantment effect).
Methods
calculateSmashDamageBonus()
public static function calculateSmashDamageBonus(float $fallDistance, int $densityLevel = 0) : floatReturns the damage a smash attack adds for the given fall distance and Density level.
calculateSmashKnockback()
public static function calculateSmashKnockback(float $distance, float $fallDistance, float $knockbackResistance = 0.0) : floatReturns the velocity added to an entity at the given distance from the smash target (0 if out of range).
canSmashAttack()
public function canSmashAttack(\pocketmine\player\Player $attacker) : boolReturns whether an attack made now by the player is a smash attack.
getArmorEffectivenessReduction()
public function getArmorEffectivenessReduction() : floatReturns the fraction of armor effectiveness the target loses against this mace (Breach).
getAttackPoints()
public function getAttackPoints() : intgetEnchantability()
public function getEnchantability() : intgetMaxDurability()
public function getMaxDurability() : intgetWindBurstMultiplier()
public function getWindBurstMultiplier() : floatReturns the Wind Burst knockback multiplier, or 0 if the mace doesn't have Wind Burst.
isValidRepairMaterial()
public function isValidRepairMaterial(\pocketmine\item\Item $item) : boolReturns whether the given item can repair this mace in an anvil.
onAttackEntity()
public function onAttackEntity(\pocketmine\entity\Entity $victim, array &$returnedItems) : boolonDestroyBlock()
public function onDestroyBlock(\pocketmine\block\Block $block, array &$returnedItems) : boolonSmashAttack()
public function onSmashAttack(\pocketmine\player\Player $attacker, \pocketmine\entity\Entity $target, float $fallDistance) : voidCalled after a smash attack hit: knocks back the entities around the target (not the attacker) and applies Wind Burst.
