Skip to content

EndCrystal ​

class · pocketmine\entity\object\EndCrystal · source

Extends Entity
Implements Explosive

End crystal. Any hit destroys it, whatever its damage (melee, any projectile that hurts entities, even snowballs and eggs, explosions, which chain into other crystals): it explodes with power 6, without fire. Like vanilla it ignores damage from the ender dragon (and its fireballs), and splash potions / bottles o' enchanting don't break it. Invulnerable crystals (the ones rebuilt on the pillars while the dragon is being respawned) only die in the void.

Constants ​

EXPLOSION_POWER 5.46.0 ​

php
public const EXPLOSION_POWER = 6.0

Power of the explosion of a destroyed crystal.

Properties ​

$beamTarget protected ​

php
protected ?\pocketmine\math\Vector3 $beamTarget

$invulnerable 5.46.0 protected ​

php
protected bool $invulnerable

$showBase protected ​

php
protected bool $showBase

Methods ​

attack() ​

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

explode() ​

php
public function explode() : void

getBeamTarget() ​

php
public function getBeamTarget() : ?\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

getPickedItem() ​

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

ignoresDamage() 5.46.0 protected ​

php
protected function ignoresDamage(\pocketmine\event\entity\EntityDamageEvent $source) : bool

Returns whether this damage leaves the crystal untouched: invulnerable crystals, the ender dragon (vanilla crystals ignore any damage the dragon causes) and thrown potions / experience bottles (they don't hurt what they hit).

initEntity() protected ​

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

isFireProof() ​

php
public function isFireProof() : bool

isInvulnerable() 5.46.0 ​

php
public function isInvulnerable() : bool

Whether the crystal ignores all damage except the void's (vanilla "permanently invulnerable").

onDeathUpdate() protected ​

php
protected function onDeathUpdate(int $tickDiff) : bool

saveNBT() ​

php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTag

setBeamTarget() ​

php
public function setBeamTarget(?\pocketmine\math\Vector3 $beamTarget) : void

Sets the block the crystal's beam points at (shown by clients), or null for no beam.

setInvulnerable() 5.46.0 ​

php
public function setInvulnerable(bool $invulnerable) : void

setShowBase() ​

php
public function setShowBase(bool $showBase) : void

showBase() ​

php
public function showBase() : bool

syncNetworkData() protected ​

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

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