VoxelEngine
 
Loading...
Searching...
No Matches
auto

Gets a chunk and casts it to the specified custom chunk type.

Gets a chunk and casts it to the specified custom chunk type.

Template Parameters
TThe custom chunk type (must inherit from Chunk).
Parameters
idThe chunk ID to retrieve.
Returns
A shared_ptr to the chunk cast to type T.
Note
This is a convenience method that performs a static_pointer_cast internally. If the chunk doesn't exist, returns nullptr. customChunk = world->getChunkAs<MyCustomChunk>(chunkID);