Modding:Chunk Data Storage: Difference between revisions
From Vintage Story Wiki
(Add modding navbox) |
m (Updated navbox to new code navbox.) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
A chunk is a 32x32x32 cube of blocks. Each chunk contains the following information: | A chunk is a 32x32x32 cube of blocks. There is a [[Modding:Chunk_Moddata|tutorial]] on adding custom moddata to a 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 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 | * [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 | ||
Line 8: | Line 10: | ||
* Format version metadata | * Format version metadata | ||
{{Navbox/ | {{Navbox/codemodding}} |
Latest revision as of 17:06, 27 March 2024
A chunk is a 32x32x32 cube of blocks. There is a tutorial on adding custom moddata to a chunk.
Each chunk contains the following information:
- Every block in the solid layer
- Every block in the fluid layer
- Sparse map of block positions to block entities
- List of entities
- Sparse map of 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 moddata
- Format version metadata
Code Modding | |||||||
---|---|---|---|---|---|---|---|
Basics | Code Mods • Preparing For Code Mods • Creating A Code Mod | ||||||
Tutorials |
|
||||||
Advanced | Server-Client Considerations • Setting up your Development Environment • Advanced Blocks • Advanced Items • Block and Item Interactions • Block Behavior • Block Entity • Particle Effects • World Access • Inventory Handling • Commands • GUIs • Network API • Monkey patching (Harmony) | ||||||
Data Management | Savegame Data Storage • ModConfig File • Chunk Data Storage • TreeAttribute | ||||||
Worldgen | WorldGen API • NatFloat • EvolvingNatFloat | ||||||
Rendering | Shaders and Renderers |
Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.
Modding | |
---|---|
Modding Introduction | Getting Started • Theme Pack |
Content Modding | Content Mods • Developing a Content Mod • Basic Tutorials • Intermediate Tutorials • Advanced Tutorials • Content Mod Concepts |
Code Modding | Code Mods • Setting up your Development Environment |
Property Overview | Item • Entity • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |