EntityFactory: added some documentation

This commit is contained in:
Dylan K. Taylor 2019-04-26 18:15:31 +01:00
parent 854c3a816c
commit ea8c723092

View File

@ -51,6 +51,14 @@ use function in_array;
use function is_a;
use function reset;
/**
* This class manages the creation of entities loaded from disk (and optionally entities created at runtime).
*
* You need to register your entity class into this factory if:
* a) you want to load/save your entity on disk (saving with chunks)
* b) you want to allow custom things to provide a custom class for your entity. Note that you must use
* create(MyEntity::class) instead of `new MyEntity()` if you want to allow this.
*/
final class EntityFactory{
private static $entityCount = 1;