Blame
|
1 | # Content Packs |
||||||
| 2 | ||||||||
| 3 | ||||||||
| 4 | > **Documentation baseline:** VoxelCore `main` at `452b569` · 14 September 2026. |
|||||||
| 5 | > **Repository:** [https://github.com/VoxelHorizons/VoxelCore](https://github.com/VoxelHorizons/VoxelCore) |
|||||||
| 6 | ||||||||
| 7 | ||||||||
| 8 | VoxelCore discovers self-contained content packs under `plugins/VoxelCore/content/`. |
|||||||
| 9 | ||||||||
| 10 | ## Layout |
|||||||
| 11 | ||||||||
| 12 | ```text |
|||||||
| 13 | plugins/VoxelCore/content/ |
|||||||
| 14 | └── <pack-directory>/ |
|||||||
| 15 | ├── pack.yml |
|||||||
| 16 | ├── content/ |
|||||||
| 17 | │ └── **/*.yml |
|||||||
| 18 | └── assets/ |
|||||||
| 19 | └── <namespace>/ |
|||||||
| 20 | ├── models/ |
|||||||
| 21 | ├── textures/ |
|||||||
| 22 | ├── font/ |
|||||||
| 23 | └── sounds/ |
|||||||
| 24 | ``` |
|||||||
| 25 | ||||||||
| 26 | The pack directory name is organisational. Identity comes from the manifest namespace and keys in the content files. |
|||||||
| 27 | ||||||||
| 28 | `content/` is scanned recursively for `.yml`/`.yaml` definitions in deterministic order, so authors can create arbitrarily useful nested organisational folders without changing ContentIDs. |
|||||||
| 29 | ||||||||
| 30 | ## `pack.yml` |
|||||||
| 31 | ||||||||
| 32 | ```yaml |
|||||||
| 33 | schema: 1 |
|||||||
| 34 | namespace: mypack |
|||||||
| 35 | dependencies: |
|||||||
| 36 | - shared |
|||||||
| 37 | - core |
|||||||
| 38 | ``` |
|||||||
| 39 | ||||||||
| 40 | Supported manifest keys are `schema`, `namespace`, and optional `dependencies`. Unknown or malformed keys are rejected rather than silently ignored. |
|||||||
| 41 | ||||||||
| 42 | ## Namespaces and dependencies |
|||||||
| 43 | ||||||||
| 44 | Each pack namespace must be unique. A pack may always reference: |
|||||||
| 45 | ||||||||
| 46 | - its own namespace; |
|||||||
| 47 | - Minecraft resources where valid. |
|||||||
| 48 | ||||||||
| 49 | A cross-pack parent or model reference requires the referenced namespace to be declared in `dependencies`. Missing dependencies and duplicate namespaces fail loading. |
|||||||
| 50 | ||||||||
| 51 | ## YAML safety and strictness |
|||||||
| 52 | ||||||||
| 53 | The loader uses bounded SnakeYAML parsing, rejects duplicate YAML keys, applies alias/document limits, validates expected scalar/list/map types, and rejects unknown top-level/item/render fields. This deliberately turns authoring mistakes into actionable load errors instead of ignored configuration. |
|||||||
| 54 | ||||||||
| 55 | ## Assets |
|||||||
| 56 | ||||||||
| 57 | Authored assets live beneath the pack's namespace. For example: |
|||||||
| 58 | ||||||||
| 59 | ```yaml |
|||||||
| 60 | render: |
|||||||
| 61 | model: mypack:item/ruby |
|||||||
| 62 | ``` |
|||||||
| 63 | ||||||||
| 64 | maps to: |
|||||||
| 65 | ||||||||
| 66 | ```text |
|||||||
| 67 | assets/mypack/models/item/ruby.json |
|||||||
| 68 | ``` |
|||||||
| 69 | ||||||||
| 70 | Generated Minecraft override/item-definition glue belongs to compiler output, not authored content. |
|||||||
| 71 | ||||||||
| 72 | Continue with [[Products/Voxel-Horizons/VoxelCore/Item-Authoring]] and [[Products/Voxel-Horizons/VoxelCore/Rendering-and-Models]]. |
|||||||