Skip to content

Ghast 5.46.0 ​

class · pocketmine\entity\monster\Ghast · source

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.15

Methods ​

attack() ​

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

getDrops() ​

php
public function getDrops() : array

getFlightAcceleration() protected ​

php
protected function getFlightAcceleration() : float

getInitialSizeInfo() protected ​

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

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getPickedItem() ​

php
public function getPickedItem() : ?\pocketmine\item\Item

getXpDropAmount() ​

php
public function getXpDropAmount() : int

initEntity() protected ​

php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : void

isCharging() ​

php
public function isCharging() : bool

isDeflectedFireball() ​

php
public static function isDeflectedFireball(\pocketmine\event\entity\EntityDamageEvent $source) : bool

Whether the damage is a fireball sent back by a player.

isFireProof() ​

php
public function isFireProof() : bool

registerGoals() protected ​

php
protected function registerGoals() : void

setCharging() ​

php
public function setCharging(bool $charging) : void

shootFireball() ​

php
public function shootFireball(\pocketmine\entity\Living $target) : \pocketmine\entity\projectile\LargeFireball

Shoots 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) : void

warn() ​

php
public function warn() : void

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