Skip to content

GenericSpawnEgg 5.46.0 ​

class · pocketmine\item\GenericSpawnEgg · source

Extends SpawnEgg

Spawn egg identified only by the Bedrock identifier of its mob. Using it spawns the entity registered for that identifier in \pocketmine\entity\EntitySpawnRegistry, or does nothing if there is none.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\item\ItemIdentifier $identifier, string $name, string $entityTypeId)

getEntityTypeId() ​

php
public function getEntityTypeId() : string

Returns the Bedrock identifier of the mob in this egg, e.g. "minecraft:cow".

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