Ghast 5.46.0
Extends FlyingMonster
Bedrock values (ghast.json): 10 health, 4x4, flies, fire immune, no fall damage, targets players within 28 blocks and shoots fireballs at them from up to 64 blocks (see GhastShootGoal and LargeFireball). A fireball deflected back by a player kills it. Loot: 0-1 ghast tear, 0-2 gunpowder (+0-1 each per Looting level), and the "Tears" music disc when killed by a player with a fireball. Experience 5.
Constants
FLY_SPEED
php
public const FLY_SPEED = 0.15Methods
attack()
php
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : voidgetDrops()
php
public function getDrops() : arraygetFlightAcceleration() protected
php
protected function getFlightAcceleration() : floatgetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
php
public function getName() : stringgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringgetPickedItem()
php
public function getPickedItem() : ?\pocketmine\item\ItemgetXpDropAmount()
php
public function getXpDropAmount() : intinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisCharging()
php
public function isCharging() : boolisDeflectedFireball()
php
public static function isDeflectedFireball(\pocketmine\event\entity\EntityDamageEvent $source) : boolWhether the damage is a fireball sent back by a player.
isFireProof()
php
public function isFireProof() : boolregisterGoals() protected
php
protected function registerGoals() : voidsetCharging()
php
public function setCharging(bool $charging) : voidshootFireball()
php
public function shootFireball(\pocketmine\entity\Living $target) : \pocketmine\entity\projectile\LargeFireballShoots a fireball at the target from 4 blocks in front of the ghast's face (Java). Returns the fireball.
syncNetworkData() protected
php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : voidwarn()
php
public function warn() : void