Blame
|
1 | # Item Authoring |
||||||
| 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 | Items are declared below an `items:` mapping in any YAML file beneath a pack's `content/` directory. |
|||||||
| 9 | ||||||||
| 10 | ```yaml |
|||||||
| 11 | items: |
|||||||
| 12 | gem_base: |
|||||||
| 13 | material: minecraft:paper |
|||||||
| 14 | bound: false |
|||||||
| 15 | lore: |
|||||||
| 16 | - A VoxelCore item |
|||||||
| 17 | ||||||||
| 18 | ruby: |
|||||||
| 19 | extends: gem_base |
|||||||
| 20 | display_name: Ruby |
|||||||
| 21 | bound: true |
|||||||
| 22 | render: |
|||||||
| 23 | model: mypack:item/ruby |
|||||||
| 24 | unbreakable: true |
|||||||
| 25 | durability: 0 |
|||||||
| 26 | attributes: |
|||||||
| 27 | hide_attributes: true |
|||||||
| 28 | custom_model_data: 1001 |
|||||||
| 29 | properties: |
|||||||
| 30 | category: gemstone |
|||||||
| 31 | ``` |
|||||||
| 32 | ||||||||
| 33 | ## Supported fields |
|||||||
| 34 | ||||||||
| 35 | The current item schema accepts: |
|||||||
| 36 | ||||||||
| 37 | - `extends` |
|||||||
| 38 | - `type` |
|||||||
| 39 | - `material` |
|||||||
| 40 | - `display_name` |
|||||||
| 41 | - `lore` |
|||||||
| 42 | - `bound` |
|||||||
| 43 | - `render` |
|||||||
| 44 | - `properties` |
|||||||
| 45 | ||||||||
| 46 | Unknown keys are errors. |
|||||||
| 47 | ||||||||
| 48 | ## ContentID |
|||||||
| 49 | ||||||||
| 50 | The key is combined with the pack namespace to form a stable ID: |
|||||||
| 51 | ||||||||
| 52 | ```text |
|||||||
| 53 | mypack:ruby |
|||||||
| 54 | ``` |
|||||||
| 55 | ||||||||
| 56 | IDs are normalised to lowercase and namespace/value segments use `[a-z0-9._-]+`. File paths do not become part of the ID. |
|||||||
| 57 | ||||||||
| 58 | ## `bound` |
|||||||
| 59 | ||||||||
| 60 | `bound` is a compiled boolean field and defaults to `false` when it is not supplied/inherited. As of PR #16, `/voxelcore admin item list` only shows definitions with `bound: true`. This makes `bound: false` useful for inheritance-only/base definitions without losing them from the compiled registry. |
|||||||
| 61 | ||||||||
| 62 | Do not infer more from this flag than the implementation guarantees: unbound definitions still exist in the registry and can be referenced/inspected. |
|||||||
| 63 | ||||||||
| 64 | ## `properties` |
|||||||
| 65 | ||||||||
| 66 | `properties` is a structured author-owned map. Parent/child maps deep-merge and compiled nested structures are deep-frozen so runtime definitions do not expose mutable nested state. |
|||||||
| 67 | ||||||||
| 68 | ## Rendering fields |
|||||||
| 69 | ||||||||
| 70 | Rendering is deliberately separate from ContentID and is covered in [[Products/Voxel-Horizons/VoxelCore/Rendering-and-Models]]. |
|||||||