hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
56 lines (27 loc) • 774 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [BlockTypeRegistry](./server.blocktyperegistry.md) > [getBlockType](./server.blocktyperegistry.getblocktype.md)
## BlockTypeRegistry.getBlockType() method
Get a registered block type by its id.
**Signature:**
```typescript
getBlockType(id: number): BlockType;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
number
</td><td>
The id of the block type to get.
</td></tr>
</tbody></table>
**Returns:**
[BlockType](./server.blocktype.md)
The block type with the given id.