| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static BlockEntityRegistry |
get() |
BlockEntityType<?> |
getBlockEntityType(String persistentId) |
String |
getPersistentId(BlockEntityType<?> type) |
<T extends BlockEntity> |
newEntity(BlockEntityType<T> type,
Block block) |
<T extends BlockEntity> |
newEntity(BlockEntityType<T> type,
Chunk chunk,
com.nukkitx.math.vector.Vector3i position)
Creates new entity of given type
|
<T extends BlockEntity> |
newEntity(BlockEntityType<T> type,
PluginContainer plugin,
Chunk chunk,
com.nukkitx.math.vector.Vector3i position)
Creates new entity of given type from specific plugin factory
|
<T extends BlockEntity> |
register(PluginContainer plugin,
BlockEntityType<T> type,
BlockEntityFactory<T> factory,
int priority) |
public static BlockEntityRegistry get()
public <T extends BlockEntity> void register(PluginContainer plugin, BlockEntityType<T> type, BlockEntityFactory<T> factory, int priority) throws RegistryException
RegistryExceptionpublic String getPersistentId(BlockEntityType<?> type)
@Nonnull public BlockEntityType<?> getBlockEntityType(String persistentId)
public <T extends BlockEntity> T newEntity(BlockEntityType<T> type, Block block)
public <T extends BlockEntity> T newEntity(BlockEntityType<T> type, Chunk chunk, com.nukkitx.math.vector.Vector3i position)
T - entity class typetype - entity typechunk - chunk of block entityposition - position of block entity in worldpublic <T extends BlockEntity> T newEntity(BlockEntityType<T> type, PluginContainer plugin, Chunk chunk, com.nukkitx.math.vector.Vector3i position)
T - entity class typetype - entity typechunk - chunk of block entityposition - position of block entity in worldpublic void close()
throws RegistryException
close in interface RegistryRegistryExceptionCopyright © 2020. All rights reserved.