Pack Structure
This page will explain how Java Edition resource packs are structured, and therefores gives an idea of how to create your first resource pack from scratch.
Overview
1📦Root2 ┣ 📂assets3 ┃ ┣ 📂minecraft4 ┃ ┃ ┣ 📂blockstates5 ┃ ┃ ┣ 📂font6 ┃ ┃ ┣ 📂icons7 ┃ ┃ ┣ 📂lang8 ┃ ┃ ┣ 📂models9 ┃ ┃ ┃ ┣ 📂block10 ┃ ┃ ┃ ┗ 📂item11 ┃ ┃ ┣ 📂particles12 ┃ ┃ ┣ 📂resourcepacks13 ┃ ┃ ┣ 📂shaders14 ┃ ┃ ┃ ┣ 📂post15 ┃ ┃ ┃ ┗ 📂program16 ┃ ┃ ┣ 📂sounds17 ┃ ┃ ┣ 📂texts18 ┃ ┃ ┣ 📂textures19 ┃ ┃ ┗ 📜sounds.json20 ┣ 📜pack.mcmeta21 ┗ 📜pack.png
Root Items
These items are not in any folder of the resource pack. It is important to note when compressing a resource pack that these items should be compressed at the same level as the assets folder. A compressed resource pack will not load if compressed from the enclosing folder.
pack.mcmeta
Files of the extension .mcmeta
use the JSON syntax. Here is an excerpt of this file from the vanilla pack:
1{2 "language": {3 "en_us": {4 "region": "US",5 "name": "English",6 "bidirectional": false7 }8 },9 "pack": {10 "description": "The default look and feel of Minecraft",11 "pack_format": 612 }13}
Though this example defines languages, this is not nesscescary unless defining a new language. The main section with which the average user should be concerned is the highlighted lines above, which specify the description of the pack visible in the resource pack switcher, and the pack format. Pack format is based on the Minecraft version with which the pack is compatible.
Currently, valid values for pack_format
are:
1
: 1.6.1 to 1.8.92
: 1.9 to 1.10.23
: 1.11 to 1.12.24
: 1.13 to 1.14.45
: 1.15 to 1.16.16
: 1.16.2 to 1.16.57
: 1.17 to 1.17.18
: 1.18 to 1.18.29
: 1.19 to 1.19.211
: 22w42a to 22w44a12
: 1.19.3 and above
pack.png
The pack.png
should be a square image, though non-square images will be stretched to conform to a square proportion. Any resolution is acceptable.
Assets
The assets folder contains all of the packs media assets. It encloses the namespace folders.
Namespaces
Namespaces are a rarely utilized feature of Java Editon resource packs. The namespace folders exist immediately after the assets folder. The default namespace is minecraft
, which is the most commonly utilized. To reference assets from a specific namespace in a resource pack when specifying a file path, the path is prefixed with the namepace and a colon.
Take the following parented model:
1{2 "textures": {3 "1": "minecraft:block/acacia_log",4 "2": "item/acacia_boat",5 "3": "custom:item/custom_texture"6 },7 "parent": "custom:block/custom_model"8}
In the above example, the full paths at which assets would be referenced is as follows:
- Texture
"1"
would resolve to/assets/minecraft/textures/block/acacia_log.png
- Texture
"2"
would resolve to/assets/minecraft/textures/item/acacia_boat.png
- Texture
"3"
would resolve to/assets/custom/textures/item/acacia_boat.png
- The parent would resolve to
/assets/custom/models/block/custom_model.json
Block States
Block states are the properties held by placed blocks. Common examples of blockstates are facing
and type
, for example, of which facing
species the direction that a block faces, and type
specifies whether a slab is top, bottom, or double. Block states are defined by the JSON files held in the blockstates
folder. Different block states or combonations of block states can correspond to different models, as well as axis rotations.
Font
The font
folder contains the configuration information for fonts. This includes glyph_sizes.bin
, defining the widths of characters used for the unicode font. Three JSON files, uniform.json, default.json
, and alt.json
, are present in the default pack. The file alt.json
lists the provider exclusively for the enchantment table font, while uniform.json
exclusively lists the provider for the legacy unicode font. The file default.json
can be used to define new main fonts. These can be of the type bitmap
, utilized by Minecraft's default font, or ttf
for TrueType fonts. Bitmap fonts are stored in a subfolder of textures, while TureType fonts are stored directly in this font
folder.
Icons
The icons
folder contains the application icons for Minecraft. These icons, however, cannot be pulled directly from a resource pack at this time.
Lang
The lang
folder contains JSON values that consist of key-value pairs in which the key is the identifier for some string used in the game, and the value is the string when that language file is applied. Language files are generalled named with a two letter contry code seperated by an underscore from a two letter language code.
Models
The models
folder holds the JSON files that create the games models. These JSON files are constructed with four main fields, textures
, elements
, display
, and parent
. They can be described as follows:
textures
maps texture paths to shortnames which can be referenced by the faces of elementselements
defined all the cubes in the model, their sizes, positions, and textues and UV values of each facedisplay
sets the appearance of a model in terms of scale, position, and rotation for different slots and perspectives, as well as item drops, item frames, and GUIparent
, when specified, pulls any of the non-specified previous fields from the specified parent model
Particles
The particles
folder contains a JSON file for each particle that specifies an array of textures for the given particle. These textures must be present in the particle
subfolder of the textures
folder. When multiple textures are defined for a single particle, this produces a framewise animated particle texture.
Resourcepacks
The resourcepacks
folder of the default resource pack contains programmer_art.zip
, which provides the legacy Minecraft textures. Like the icons
folder, this cannot currently be utilized by custom resource packs.
Shaders
The shaders
folder is comprised of three subfolders, core
, post
, and program
. In general, shaders affect how the game is rendered.
Program
The program
subfolder is comprised of JSON files that specifcy a vertex and fragment shader.
Post
The post
subfolder contains shaders written in GLSL, Open GL Shader Language, in the form of vertex shaders (.vsh
) and fragment shaders (.fsh
). Vertex shaders are applied to all vertexes, the point where the corners of planes intersect, while fragment shaders are applied to each pixel.
Core
The core
subfolder defines shader programs that are directly utilized by the game.
Sounds
The sounds
folder contains all the sounds for the game. This folder does not ship with the version JAR, and must be extracted from the hashed assets in the assets folder of the Minecraft folder. All sounds are of the OGG format and use the Vorbis audio codec. These sounds are triggered in game by sound events defined in sounds.json
, which exists in the namespace folder, above the sounds folder. Events can contain mutliple sounds from which a random sound will be chosen. Weight, volume, and pitch can also be controlled on a per event basis. A subtitle event can also be defined for each sound event, the value of which can then be specified in a language file.
Texts
The texts folder contains three plain text files with the extension .txt
, credits.txt
, end.txt
, and splashes.txt
. The file credits.txt
contains the game scrolling credits and utilize book-style color codes with the §
symbol. The end.txt
file defines a poem that scrolls when the Enderdragon is defeated, and also uses color codes.The final file, splashes.txt
, does not utilize color codes. It specifies the random phrases that appear on the start game splash screen.
Textures
The textures
folder contains all game textures. Textures must utilize the png format. In previous versions, textures were required to be square. This is no longer the case. Textures sometimes are accompanied by .mcmeta
files that specify texture animation. These folders take the full filename of the texture with extensions, followed by .mcmeta
.