EnderPearl
Extends Throwable
Bedrock values (entities/ender_pearl.json): teleports its owner where it lands (5 fall damage) and has a 5% chance to spawn an endermite there (on_hit spawn_chance; not in peaceful, where it would despawn at once).
Constants
ENDERMITE_CHANCE 5.46.0
php
public const ENDERMITE_CHANCE = 0.05Methods
getEndermiteChance() 5.46.0
php
public static function getEndermiteChance() : floatgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringonHit() protected
php
protected function onHit(\pocketmine\event\entity\ProjectileHitEvent $event) : voidsetEndermiteChance() 5.46.0
php
public static function setEndermiteChance(?float $chance) : voidOverrides the chance that a landing pearl spawns an endermite (tests and test plugins); null restores the vanilla 5%.
trySpawnEndermite() 5.46.0
php
public function trySpawnEndermite(\pocketmine\math\Vector3 $pos) : ?\pocketmine\entity\monster\EndermiteRolls the endermite chance and spawns one at the given position.
