| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static EntityRegistry |
get() |
com.nukkitx.nbt.NbtMap |
getEntityIdentifiersPalette() |
EntityType<?> |
getEntityType(Identifier identifier) |
EntityType<?> |
getEntityType(int runtimeId) |
com.google.common.collect.ImmutableSet<EntityType<?>> |
getEntityTypes() |
Identifier |
getIdentifier(String legacyName) |
String |
getLegacyName(Identifier identifier) |
int |
getRuntimeType(EntityType<?> type) |
<T extends Entity> |
newEntity(EntityType<T> type,
Location location)
Creates new entity of given type
|
<T extends Entity> |
newEntity(EntityType<T> type,
Plugin plugin,
Location location)
Creates new entity of given type from specific plugin factory
|
long |
newEntityId()
Allocate new entity ID
|
<T extends Entity> |
register(Plugin plugin,
EntityType<T> type,
EntityFactory<T> factory,
int priority,
boolean hasSpawnEgg) |
public static EntityRegistry get()
public <T extends Entity> void register(Plugin plugin, EntityType<T> type, EntityFactory<T> factory, int priority, boolean hasSpawnEgg)
public int getRuntimeType(EntityType<?> type)
public EntityType<?> getEntityType(int runtimeId)
public EntityType<?> getEntityType(Identifier identifier)
public <T extends Entity> T newEntity(EntityType<T> type, Location location)
T - entity class typetype - entity typelocation - location to spawn entitypublic <T extends Entity> T newEntity(EntityType<T> type, Plugin plugin, Location location)
T - entity class typetype - entity typelocation - location to spawn entitypublic long newEntityId()
public Identifier getIdentifier(String legacyName)
public String getLegacyName(Identifier identifier)
public com.nukkitx.nbt.NbtMap getEntityIdentifiersPalette()
public com.google.common.collect.ImmutableSet<EntityType<?>> getEntityTypes()
public void close()
throws RegistryException
close in interface RegistryRegistryExceptionCopyright © 2020. All rights reserved.