Skip to content

LargeFireball 5.46.0 ​

class · pocketmine\entity\projectile\LargeFireball · source

Extends Throwable
Implements NeverSavedWithChunkEntity

Ghast fireball (minecraft:fireball). Flies in a straight line, accelerating towards a terminal speed of about 1.9 blocks per tick (Java: +0.1 per tick along its heading, 5% drag), and explodes on impact (power 1, sets fires, 6 damage to the entity hit).

Hitting it (melee or a projectile) deflects it: it flies where the attacker is looking and the attacker becomes its owner, so a deflected fireball that hits a ghast kills it (see \pocketmine\entity\monster\Ghast).

Constants ​

ACCELERATION ​

php
public const ACCELERATION = 0.1

EXPLOSION_POWER ​

php
public const EXPLOSION_POWER = 1.0

IMPACT_DAMAGE ​

php
public const IMPACT_DAMAGE = 6

Methods ​

__construct() ​

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

attack() ​

php
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : void

deflect() ​

php
public function deflect(\pocketmine\entity\Entity $by) : void

Sends the fireball back where the attacker is looking (vanilla reflect_on_hurt).

entityBaseTick() protected ​

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

explode() ​

php
public function explode() : void

getAcceleration() ​

php
public function getAcceleration() : \pocketmine\math\Vector3

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

hasMovementUpdate() ​

php
public function hasMovementUpdate() : bool

isDeflected() ​

php
public function isDeflected() : bool

Whether a player or mob hit the fireball back.

isFireProof() ​

php
public function isFireProof() : bool

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

syncNetworkData() protected ​

php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void

tryChangeMovement() protected ​

php
protected function tryChangeMovement() : void

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