Modding:Chunk Data Storage: Difference between revisions

From Vintage Story Wiki
m (Updated navbox to new code navbox.)
(Convert the page into a redirect now that all of its data is copied out)
Tag: New redirect
 
Line 1: Line 1:
A chunk is a 32x32x32 cube of blocks. There is a [[Modding:Chunk_Moddata|tutorial]] on adding custom moddata to a chunk.
#REDIRECT [[Modding:VCDBS_format#chunk]]
 
Each chunk contains the following information:
* [https://apidocs.vintagestory.at/api/Vintagestory.API.Common.IWorldChunk.html#Vintagestory_API_Common_IWorldChunk_GetLocalBlockAtBlockPos_Vintagestory_API_Common_IWorldAccessor_System_Int32_System_Int32_System_Int32_System_Int32_ Every block] in the solid layer
* [https://apidocs.vintagestory.at/api/Vintagestory.API.Common.IWorldChunk.html#Vintagestory_API_Common_IWorldChunk_GetLocalBlockAtBlockPos_Vintagestory_API_Common_IWorldAccessor_System_Int32_System_Int32_System_Int32_System_Int32_ Every block] in the fluid layer
* Sparse map of block positions to [https://apidocs.vintagestory.at/api/Vintagestory.API.Common.IWorldChunk.html#Vintagestory_API_Common_IWorldChunk_BlockEntities block entities]
* List of [https://apidocs.vintagestory.at/api/Vintagestory.API.Common.IWorldChunk.html#Vintagestory_API_Common_IWorldChunk_Entities entities]
* Sparse map of [https://apidocs.vintagestory.at/api/Vintagestory.API.Common.IWorldChunk.html#Vintagestory_API_Common_IWorldChunk_GetDecor_Vintagestory_API_Common_IBlockAccessor_Vintagestory_API_MathTools_BlockPos_System_Int32_ decor blocks]. The map is indexed by both the block position and decor index. The decor index includes which face of the parent block the decor is attached to, and optionally a location on a 16x16 grid on that block face (used by caveart).
* Map of modid to a byte array of custom [[Modding:Chunk_Moddata|moddata]]
* Format version metadata
 
{{Navbox/codemodding}}

Latest revision as of 00:22, 21 July 2024