-
Notifications
You must be signed in to change notification settings - Fork 0
Pack.mcmeta Generation
Minetrio1256 edited this page Jun 16, 2026
·
1 revision
Pantheon provides a simplified API for generating pack.mcmeta files without having to manually construct Mojang's JSON schema.
PackMCMeta meta = PackMCMeta.builder()
.description("My Awesome Resource Pack")
.packFormat(61)
.supports(61, 81)
.build();This produces a pack.mcmeta file similar to:
{
"pack": {
"description": "My Awesome Resource Pack",
"pack_format": 61,
"min_format": 61,
"max_format": 81,
"supported_formats": {
"min_inclusive": 61,
"max_inclusive": 81
}
}
}Sets the pack description shown in Minecraft.
.description("My Resource Pack")Sets the primary pack format.
.packFormat(61)Result:
{
"pack": {
"pack_format": 61
}
}Defines the range of supported pack formats.
.supports(61, 81)Result:
{
"pack": {
"min_format": 61,
"max_format": 81,
"supported_formats": {
"min_inclusive": 61,
"max_inclusive": 81
}
}
}Enable experimental Minecraft features.
.addFeature("minecraft:bundle")
.addFeature("minecraft:vanilla")Result:
{
"features": {
"enabled": [
"minecraft:bundle",
"minecraft:vanilla"
]
}
}Filters files from lower-priority packs.
.addFilter(
"minecraft",
"textures/.*"
)Result:
{
"filter": {
"block": [
{
"namespace": "minecraft",
"path": "textures/.*"
}
]
}
}Multiple filters may be added:
.addFilter("minecraft", "textures/.*")
.addFilter("example", "models/.*")Adds version-specific overlays.
.addOverlay(
"legacy_models",
46,
60
)Result:
{
"overlays": {
"entries": [
{
"directory": "legacy_models",
"min_format": 46,
"max_format": 60,
"formats": {
"min_inclusive": 46,
"max_inclusive": 60
}
}
]
}
}Multiple overlays are supported.
.addOverlay("legacy_models", 46, 60)
.addOverlay("modern_models", 61, 81)Registers additional languages.
.addLanguage(
"pirate_en",
"Pirate Speak",
"Seven Seas",
false
)Result:
{
"language": {
"pirate_en": {
"name": "Pirate Speak",
"region": "Seven Seas",
"bidirectional": false
}
}
}For right-to-left languages:
.addLanguage(
"ar_sa",
"Arabic",
"Saudi Arabia",
true
)PackMCMeta meta = PackMCMeta.builder()
.description("Pantheon Example Pack")
.packFormat(61)
.supports(61, 81)
.addFeature("minecraft:bundle")
.addFilter(
"minecraft",
"textures/.*"
)
.addOverlay(
"legacy_models",
46,
60
)
.addLanguage(
"en_us",
"English",
"United States",
false
)
.build();Once configured, serialize the metadata:
PackMCMetaSerializer.serialize(
packDirectory,
meta
);This will generate the pack.mcmeta file in the specified pack directory.