UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

157 lines (69 loc) 1.96 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [BlockTypeOptions](./server.blocktypeoptions.md) ## BlockTypeOptions interface Options for creating a block type instance. Use for: defining new block types to register in a `BlockTypeRegistry`<!-- -->. Do NOT use for: placing blocks; use `ChunkLattice.setBlock`<!-- -->. \*\*Category:\*\* Blocks **Signature:** ```typescript export interface BlockTypeOptions ``` ## Properties <table><thead><tr><th> Property </th><th> Modifiers </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> [customColliderOptions?](./server.blocktypeoptions.customcollideroptions.md) </td><td> </td><td> [VoxelsColliderOptions](./server.voxelscollideroptions.md) \| [TrimeshColliderOptions](./server.trimeshcollideroptions.md) </td><td> _(Optional)_ The custom collider options for the block type. </td></tr> <tr><td> [id](./server.blocktypeoptions.id.md) </td><td> </td><td> number </td><td> The unique numeric identifier for the block type. </td></tr> <tr><td> [isLiquid?](./server.blocktypeoptions.isliquid.md) </td><td> </td><td> boolean </td><td> _(Optional)_ Whether the block type is a liquid. </td></tr> <tr><td> [lightLevel?](./server.blocktypeoptions.lightlevel.md) </td><td> </td><td> number </td><td> _(Optional)_ The light emission level, between 0 and 15. </td></tr> <tr><td> [name](./server.blocktypeoptions.name.md) </td><td> </td><td> string </td><td> The name of the block type. </td></tr> <tr><td> [textureUri](./server.blocktypeoptions.textureuri.md) </td><td> </td><td> string </td><td> The URI of the texture asset for the block type. </td></tr> </tbody></table>