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