hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
60 lines (29 loc) • 943 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [BlockTextureRegistry](./server.blocktextureregistry.md) > [hasBlockTexture](./server.blocktextureregistry.hasblocktexture.md)
## BlockTextureRegistry.hasBlockTexture() method
Checks if a block texture is registered in the atlas.
**Signature:**
```typescript
hasBlockTexture(textureUri: string): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
textureUri
</td><td>
string
</td><td>
The URI of the texture (e.g., 'blocks/stone.png' or 'blocks/grass' for cubemaps).
</td></tr>
</tbody></table>
**Returns:**
boolean
Whether the texture is registered.
\*\*Requires:\*\* Atlas must be preloaded (server startup).
\*\*Category:\*\* Textures