public class EntityManager extends FactoryManager<EntityManager,Entity,EntityFactory>
| Modifier and Type | Class and Description |
|---|---|
class |
EntityManager.Init |
Manager.ManagerEvent<S>registry| Modifier and Type | Method and Description |
|---|---|
void |
init()
Initializes the manager event
|
EntityFactory |
register(java.lang.String id,
java.lang.Class<? extends Entity> type)
Register a new entity type.
|
EntityFactory |
register(java.lang.String id,
java.lang.Class<? extends Entity> type,
java.util.function.Function<java.lang.Class<?>,java.util.Optional<?>> mapping)
Register a new entity type.
|
EntityFactory |
register(java.lang.String id,
java.util.function.Supplier<Entity> constructor)
Register a new entity type.
|
get, registerpublic EntityFactory register(java.lang.String id, java.lang.Class<? extends Entity> type, java.util.function.Function<java.lang.Class<?>,java.util.Optional<?>> mapping)
register in class FactoryManager<EntityManager,Entity,EntityFactory>id - The entity IDtype - The class of the entitymapping - The custom DI mappingpublic EntityFactory register(java.lang.String id, java.lang.Class<? extends Entity> type)
register in class FactoryManager<EntityManager,Entity,EntityFactory>id - The entity IDtype - The class of the blockpublic EntityFactory register(java.lang.String id, java.util.function.Supplier<Entity> constructor)
register in class FactoryManager<EntityManager,Entity,EntityFactory>id - The entity IDconstructor - Entity instance Supplierpublic void init()
Managerinit in class Manager<EntityManager>