hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
64 lines (31 loc) • 1.18 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [BlockTypeRegistry](./server.blocktyperegistry.md) > [registerGenericBlockType](./server.blocktyperegistry.registergenericblocktype.md)
## BlockTypeRegistry.registerGenericBlockType() method
Register a generic block type.
**Signature:**
```typescript
registerGenericBlockType(blockTypeOptions: BlockTypeOptions): BlockType;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
blockTypeOptions
</td><td>
[BlockTypeOptions](./server.blocktypeoptions.md)
</td><td>
The options for the block type.
</td></tr>
</tbody></table>
**Returns:**
[BlockType](./server.blocktype.md)
The registered block type.
\*\*Side effects:\*\* Emits `BlockTypeRegistryEvent.REGISTER_BLOCK_TYPE`<!-- -->.
\*\*Category:\*\* Blocks
## Remarks
\*\*Creates anonymous class:\*\* Internally creates an anonymous class extending `BlockType` with the provided options, then calls `registerBlockType()`<!-- -->.