pack.mcmeta

This feature is exclusive to Java Edition.
 

The pack.mcmeta file is used to define metadata of a resource pack or data pack. The presence of this file identifies a directory or ZIP archive file as a resource pack or data pack.

Format

The pack.mcmeta file is defined using the following JSON format:

  • [NBT Compound / JSON Object] The root object.
    • [NBT Compound / JSON Object] pack: Holds the pack information.
      • [String][NBT List / JSON Array][NBT Compound / JSON Object] description: A text component that appears when hovering over the pack's name in the list given by the /datapack list command, or when viewing the pack in the Create World screen.
      • [Int] pack_format: Determines the version(s) of Minecraft that this pack is compatible with. See Pack format for a full list of pack format numbers.
      • [Int][Int Array][NBT Compound / JSON Object] supported_formats: (optional) Describes a range for pack formats that this pack supports. The range has to include the value of [Int] pack_format. Examples: 42, [42, 45], { "min_inclusive": 42, "max_inclusive": 45 }.
    • [NBT Compound / JSON Object] features: (optional) Section for selecting experimental features.
    • [NBT Compound / JSON Object] filter: (optional) Section for filtering out files from packs applied below this one. Any file that matches one of the patterns inside [NBT List / JSON Array] block is treated as if it was not present in the pack at all.
      • [NBT List / JSON Array] block: List of patterns.
        • [NBT Compound / JSON Object]: A pattern.
          • [String] namespace: A regular expression for the namespace of files to be filtered out. If unspecified, it applies to every namespace.
          • [String] path: A regular expression for the paths of files to be filtered out. If unspecified, it applies to every file.
    • [NBT Compound / JSON Object] overlays: (optional) Section for specifying the overlays, which are sub-packs applied over the "normal" contents of a pack. Their directories have their own assets and data directories, and are placed in the pack's root directory.
      • [NBT List / JSON Array] entries: List of overlays. The order is important, as the first in the list is applied first.
        • [NBT Compound / JSON Object]: An overlay.
          • [Int][Int Array][NBT Compound / JSON Object] formats: Describes a range for pack formats when this overlay should be active. Examples: 42, [42, 45], { "min_inclusive": 42, "max_inclusive": 45 }.
          • [String] directory: The directory to overlay for the respective versions (allowed characters: a-z, 0-9, _ and -). In this directory, pack.mcmeta and pack.png are ignored.
    • [NBT Compound / JSON Object] language: (optional) Only present in resource packs — Contains additional languages to add to the language menu.
      • [NBT Compound / JSON Object] Language code for a language, corresponding to a .json file with the same name in the directory assets/<namespace>/lang.
        • [String] name: The full name of the language
        • [String] region: The country or region name
        • [Boolean] bidirectional: If true, the language reads right to left.

External links

Navigation