43 lines
3.6 KiB
Text
43 lines
3.6 KiB
Text
{{DISPLAYTITLE:{{mono|pack.mcmeta}}}}
|
|
{{exclusive|java}}
|
|
The '''{{cd|pack.mcmeta}}''' file is used to define metadata of a [[resource pack]] or [[data pack]]. The presence of this file identifies a folder or ZIP archive file as a resource pack or data pack.
|
|
|
|
== Format ==
|
|
The {{cd|pack.mcmeta}} file is defined using following [[JSON]] format:
|
|
|
|
<div class="treeview">
|
|
* {{nbt|compound}} The root object.
|
|
** {{nbt|compound|pack}}: Holds the pack information.
|
|
*** {{nbt|string}}{{nbt|list}}{{nbt|compound|description}}: A [[Raw JSON text format|JSON text]] that appears when hovering over the pack's name in the list given by the {{cmd|datapack list}} command, or when viewing the pack in the Create World screen.
|
|
*** {{nbt|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.
|
|
*** {{Nbt|integer|}}{{Nbt|int-array}}{{Nbt|compound|supported_formats}}: (optional) Describes a range for [[pack format]]s that this pack supports. The range has to include the value of {{nbt|int|pack_format}}. Examples: {{cd|42}}, {{cd|[42, 45]}}, {{cd|<nowiki>{ "min_inclusive": 42, "max_inclusive": 45 }</nowiki>}}.
|
|
** {{nbt|compound|features}}: (optional) Section for selecting [[Experiments|experimental]] features.
|
|
*** {{nbt|list|enabled}}: List of enabled [[Experiments#Java Edition|feature flags]].
|
|
**** {{nbt|string}}: [[Resource location]] of a feature flag.
|
|
** {{nbt|compound|filter}}: (optional) Section for filtering out files from packs applied below this one. Any file that matches one of the patterns inside {{nbt|list|block}} is treated as if it was not present in the pack at all.
|
|
*** {{nbt|list|block}}: List of patterns.
|
|
**** {{nbt|compound}}: A pattern.
|
|
***** {{nbt|string|namespace}}: A {{w|regular expression}} for the namespace of files to be filtered out. If unspecified, it applies to every namespace.
|
|
***** {{nbt|string|path}}: A {{w|regular expression}} for the paths of files to be filtered out. If unspecified, it applies to every file.
|
|
** {{nbt|compound|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|entries}}: List of overlays. The order is important, as the first in the list is applied first.
|
|
**** {{nbt|compound}}: An overlay.
|
|
***** {{nbt|integer|}}{{nbt|int-array}}{{nbt|compound|formats}}: Describes a range for [[pack format]]s when this overlay should be active. Examples: {{cd|42}}, {{cd|[42, 45]}}, {{cd|<nowiki>{ "min_inclusive": 42, "max_inclusive": 45 }</nowiki>}}.
|
|
***** {{nbt|string|directory}}: The directory to overlay for the respective versions (allowed characters: {{cd|a-z}}, {{cd|0-9}}, {{cd|_}} and {{cd|-}}). In this directory, {{cd|pack.mcmeta}} and {{cd|pack.png}} are ignored.
|
|
** {{nbt|compound|language}}: (optional) Only present in [[resource packs]] — Contains additional languages to add to the language menu.
|
|
*** {{nbt|compound}} Language code for a language, corresponding to a {{cd|.json}} file with the same name in the folder {{cd|assets/''<[[namespace]]>''/lang}}.
|
|
**** {{nbt|string|name}}: The full name of the language
|
|
**** {{nbt|string|region}}: The country or region name
|
|
**** {{nbt|bool|bidirectional}}: If true, the language reads right to left.
|
|
</div>
|
|
|
|
== External links ==
|
|
* [https://misode.github.io/pack-mcmeta/ Pack.mcmeta Generator on misode.github.io]
|
|
|
|
== Navigation ==
|
|
{{Navbox Java Edition technical|pack}}
|
|
|
|
[[fr:Pack.mcmeta]]
|
|
[[ja:Pack.mcmeta]]
|
|
[[ru:Pack.mcmeta]]
|
|
[[zh:Pack.mcmeta]]
|