public class BlockEntityRegistry extends Object implements org.cloudburstmc.api.registry.Registry
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static BlockEntityRegistry |
get() |
org.cloudburstmc.api.blockentity.BlockEntityType<?> |
getBlockEntityType(String persistentId) |
String |
getPersistentId(org.cloudburstmc.api.blockentity.BlockEntityType<?> type) |
<T extends org.cloudburstmc.api.blockentity.BlockEntity> |
newEntity(org.cloudburstmc.api.blockentity.BlockEntityType<T> type,
org.cloudburstmc.api.block.Block block) |
<T extends org.cloudburstmc.api.blockentity.BlockEntity> |
newEntity(org.cloudburstmc.api.blockentity.BlockEntityType<T> type,
CloudChunk chunk,
com.nukkitx.math.vector.Vector3i position)
Creates new entity of given type
|
<T extends org.cloudburstmc.api.blockentity.BlockEntity> |
newEntity(org.cloudburstmc.api.blockentity.BlockEntityType<T> type,
Object plugin,
CloudChunk chunk,
com.nukkitx.math.vector.Vector3i position)
Creates new entity of given type from specific plugin factory
|
<T extends org.cloudburstmc.api.blockentity.BlockEntity> |
register(Object plugin,
org.cloudburstmc.api.blockentity.BlockEntityType<T> type,
org.cloudburstmc.api.blockentity.BlockEntityFactory<T> factory,
int priority) |
public static BlockEntityRegistry get()
public <T extends org.cloudburstmc.api.blockentity.BlockEntity> void register(Object plugin, org.cloudburstmc.api.blockentity.BlockEntityType<T> type, org.cloudburstmc.api.blockentity.BlockEntityFactory<T> factory, int priority) throws org.cloudburstmc.api.registry.RegistryException
org.cloudburstmc.api.registry.RegistryExceptionpublic String getPersistentId(org.cloudburstmc.api.blockentity.BlockEntityType<?> type)
@Nonnull public org.cloudburstmc.api.blockentity.BlockEntityType<?> getBlockEntityType(String persistentId)
public <T extends org.cloudburstmc.api.blockentity.BlockEntity> T newEntity(org.cloudburstmc.api.blockentity.BlockEntityType<T> type,
org.cloudburstmc.api.block.Block block)
public <T extends org.cloudburstmc.api.blockentity.BlockEntity> T newEntity(org.cloudburstmc.api.blockentity.BlockEntityType<T> type,
CloudChunk 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 org.cloudburstmc.api.blockentity.BlockEntity> T newEntity(org.cloudburstmc.api.blockentity.BlockEntityType<T> type,
Object plugin,
CloudChunk 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 org.cloudburstmc.api.registry.RegistryException
close in interface org.cloudburstmc.api.registry.Registryorg.cloudburstmc.api.registry.RegistryExceptionCopyright © 2021. All rights reserved.