Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 1.53 KB

3. Lists.md

File metadata and controls

39 lines (32 loc) · 1.53 KB

Lists

List files define a list of items which are displayed in the game with the list UI. Each list file defines a single list.

File Format

The file is a JSON object with the following keys:

  • type: (string) Required. Must be set to "list".
  • disableAutoLink: (boolean) Optional. If true, this list can only be explicitly linked to, and won't ever show up on it's own. Defaults to false.
  • displayName: (string) Optional. A translation key for the list display name. (See Language Files)
  • link: (string) Optional. A resource location string for the linked list(palettes are not supported here!). (See Links)
  • items: (array) Required. An array of items in the list. Items can be specified as a simple string (resource location).
  • openOnlyItems: (array) Optional. An array of items that should link to the list, without being part of it.
  • icon: (string) Optional. A resource location string for the icon of the list.

Example JSON

{
  "type": "list",
  "disableAutoLink": true,
  "displayName": "item_group.custom_list",
  "link": "modid:linked_palette",
  "items": [
    "minecraft:netherite_pickaxe",
    "minecraft:diamond_pickaxe",
    "minecraft:iron_pickaxe",
    "minecraft:golden_pickaxe",
    "minecraft:stone_pickaxe"
  ],
  "openOnlyItems": [
    "minecraft:wooden_pickaxe"
  ],
  "icon": "minecraft:chest"
}

In this example, a custom item list is defined with auto-linking disabled, a display name, a link to another list, a list of items, open-only items, and an icon.