UV maps store texture coordinate data for the faces of blocks in a Celaria map. Each entry in aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/BunnyNabbit/celaria-formats/llms.txt
Use this file to discover all available pages before exploring further.
.cuvdata file describes how a texture is mapped onto one face of one block, using a pair of 2D coordinates that define the start and end of the texture region. CelariaUvMap provides a static parse method to read this data.
Parsing a .cuvdata file
Pass a Buffer to CelariaUvMap.parse(buffer). The method reads the file signature, validates the version, and returns an array of UvData objects — one per block face entry.
UvData structure
Each object in the returned array has the following fields:| Field | Type | Description |
|---|---|---|
blockId | number | Index of the block this UV entry belongs to |
faceId | number | Which face of the block (0–5 for a rectangular prism) |
startX | number | Horizontal start coordinate of the texture region (float) |
startY | number | Vertical start coordinate of the texture region (float) |
endX | number | Horizontal end coordinate of the texture region (float) |
endY | number | Vertical end coordinate of the texture region (float) |
startX/startY and endX/endY define a rectangle in UV space that maps onto the block face. These are stored as 32-bit floats in the binary format.
File format details
.cuvdata files must begin with the ASCII signature "cuvdata". If the file does not start with this string, parse throws Error("Magic mismatch.").
Only version 0 is currently supported. If the version byte in the file does not equal 0, parse throws Error("Unsupported version <n>.").
CelariaUvMap only supports parsing — there is no serialize method. UV map files cannot be written back to disk using this library.