EntityFactory
This class manages the creation of entities loaded from disk. You need to register your entity into this factory if you want to load/save your entity on disk (saving with chunks).
Constants
TAG_IDENTIFIER
php
public const TAG_IDENTIFIER = "identifier"TAG_LEGACY_ID
php
public const TAG_LEGACY_ID = "id"Methods
__construct()
php
public function __construct()getSaveId()
php
public function getSaveId(string $class) : stringinjectSaveId()
php
public function injectSaveId(string $class, \pocketmine\nbt\tag\CompoundTag $saveData) : voidisRegistered()
php
public function isRegistered(string $class) : boolregister()
php
public function register(string $className, \Closure $creationFunc, array $saveNames) : voidRegisters an entity type into the index.
NOTE: The first save name in the $saveNames array will be used when saving the entity to disk.
