LargeFireball 5.46.0
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.1EXPLOSION_POWER
php
public const EXPLOSION_POWER = 1.0IMPACT_DAMAGE
php
public const IMPACT_DAMAGE = 6Methods
__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) : voiddeflect()
php
public function deflect(\pocketmine\entity\Entity $by) : voidSends the fireball back where the attacker is looking (vanilla reflect_on_hurt).
entityBaseTick() protected
php
protected function entityBaseTick(int $tickDiff = 1) : boolexplode()
php
public function explode() : voidgetAcceleration()
php
public function getAcceleration() : \pocketmine\math\Vector3getInitialDragMultiplier() protected
php
protected function getInitialDragMultiplier() : floatgetInitialGravity() protected
php
protected function getInitialGravity() : floatgetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetNetworkTypeId()
php
public static function getNetworkTypeId() : stringhasMovementUpdate()
php
public function hasMovementUpdate() : boolisDeflected()
php
public function isDeflected() : boolWhether a player or mob hit the fireball back.
isFireProof()
php
public function isFireProof() : boolonHit() protected
php
protected function onHit(\pocketmine\event\entity\ProjectileHitEvent $event) : voidonHitBlock() protected
php
protected function onHitBlock(\pocketmine\block\Block $blockHit, \pocketmine\math\RayTraceResult $hitResult) : voidsyncNetworkData() protected
php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : voidtryChangeMovement() protected
php
protected function tryChangeMovement() : void