Skip to content

WindCharge 5.46.0 ​

class · pocketmine\entity\projectile\WindCharge · source

Extends Throwable

Wind charge thrown by a player. Flies straight (no gravity), deals 1 damage on a direct hit and bursts on impact, pushing every nearby entity away, the thrower included, without damaging blocks. Entities launched by the burst only take fall damage for the distance they fall below it.

Vanilla (https://minecraft.wiki/w/Wind_Charge): player wind charges deal 1 damage on Bedrock, burst in a 2.4 block sphere and have 22% more knockback than breeze wind charges. Burst radius 1.2 and knockback multiplier 1.22 are the values of Java's WindCharge. TODO: toggling doors, trapdoors, buttons, levers and other blocks hit by the burst

Constants ​

BURST_KNOCKBACK_MULTIPLIER ​

php
public const BURST_KNOCKBACK_MULTIPLIER = 1.22

BURST_RADIUS ​

php
public const BURST_RADIUS = 1.2

Properties ​

$burst protected ​

php
protected bool $burst

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Location $location, ?\pocketmine\entity\Entity $shootingEntity, ?\pocketmine\nbt\tag\CompoundTag $nbt = null)

entityBaseTick() protected ​

php
protected function entityBaseTick(int $tickDiff = 1) : bool

getInitialDragMultiplier() protected ​

php
protected function getInitialDragMultiplier() : float

getInitialGravity() protected ​

php
protected function getInitialGravity() : float

getInitialSizeInfo() protected ​

php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfo

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

onHit() protected ​

php
protected function onHit(\pocketmine\event\entity\ProjectileHitEvent $event) : void

onHitBlock() protected ​

php
protected function onHitBlock(\pocketmine\block\Block $blockHit, \pocketmine\math\RayTraceResult $hitResult) : void

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