Skip to content

WindBurst 5.46.0 ​

final class · pocketmine\world\WindBurst · source

A burst of wind (wind charge, Wind Burst enchantment) that pushes entities away without damaging them or blocks.

Uses the explosion knockback rule of Java's ServerExplosion: an entity within twice the radius (measured to its feet) is pushed away from the center, towards its eyes, with strength (1 - distance / (radius * 2)) * multiplier. Unlike Java, block exposure is not taken into account. An entity standing at the center is launched straight up.

Methods ​

apply() ​

php
public static function apply(\pocketmine\world\World $world, \pocketmine\math\Vector3 $center, float $radius, float $knockbackMultiplier, bool $negatesFallDamage, ?\pocketmine\entity\Entity $exclude = null) : array

calculateImpulse() ​

php
public static function calculateImpulse(\pocketmine\math\Vector3 $center, \pocketmine\math\Vector3 $feet, float $eyeHeight, float $radius, float $knockbackMultiplier) : ?\pocketmine\math\Vector3

Returns the velocity added to an entity whose feet are at $feet, or null if it is out of reach.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.