Resource Pack
The resource pack system provides a way for players to customize textures, models, music, sounds, languages, texts such as the end poem, splashes and credits, and fonts, without any code modification.
Contents
Java EditionEdit
BehaviorEdit
Resource packs can be placed in the folder resourcepacks
within the .minecraft
folder. Each resource pack is either a sub-folder or a .zip
file within the resourcepacks
folder. Once in the folder, a resource pack can be added from the options, where resource packs can be moved between "Available resource packs" and "Selected resource packs". "Selected resource packs" also contain the default assets on the bottom, which cannot be removed.
Resource packs load their assets based on the order of the packs on the list. The bottom-most pack loads first, then each pack placed above it replaces assets of the same name with its assets.
Default resource packsEdit
A resource pack can be bundled with a world by saving it under the name resources
and placing it directly in the world's folder. When playing the world, that resource pack appears as the default right above the default resource pack.
A default resource pack can also be set on a server by adding a link to a .zip
file download after the line resource-pack=
in the server properties file. Users can still opt out of using the resource pack or choose not to download it, however.
The old (pre-1.14) textures are available in a resource pack titled "Programmer Art". These textures are not updated when the game receives new textures.
Folder structureEdit
|
More than one directory for different namespaces may exist under the assets
directory.
ContentsEdit
A resource pack is identified by Minecraft based on the presence of the file pack.mcmeta
in the root directory, which contains a JSON file with the following information:
- The root tag
- pack: Holds the resource pack information
- pack_format: Pack version. If this number does not match the current required number, the resource pack displays an error and required additional confirmation to load the pack. Requires
1
for 1.6.1–1.8.9,2
for 1.9–1.10.2,3
for 1.11–1.12.2,4
for 1.13–1.14.4,5
for 1.15–1.16.1,6
for 1.16.2–1.16.5, and7
for 1.17. - description: Text shown below the pack name in the resource pack menu. The text is shown on two lines. If the text is too long it is truncated.
- description: Contains a raw JSON text object that is shown instead as the pack description in the resource pack menu. Same behavior as the
string
version of thedescription
tag, but they cannot exist together.
- pack_format: Pack version. If this number does not match the current required number, the resource pack displays an error and required additional confirmation to load the pack. Requires
- language: Contains additional languages to add to the language menu
- Language code for a language, corresponding to a .json file with the same name in the folder assets/<namespace>/lang.
- name: The full name of the language
- region: The country or region name
- bidirectional: If true, the language reads right to left.
- Language code for a language, corresponding to a .json file with the same name in the folder assets/<namespace>/lang.
- pack: Holds the resource pack information
The root directory also contains an optional image called pack.png, which appears as the thumbnail for the pack on the resource pack selection menu.
LanguageEdit
Resource packs can create language files of the type .json
in the folder assets/<namespace>/lang
. Each file either replaces information from a file of the same name in the default or a lower pack, or it creates a new language as defined by pack.mcmeta
.
Each line in the .json
file is in the standard json format of "identifier":"name"
followed by a comma in case it is followed by another value in the next line. identifier
is the name that the game looks for to determine the name for something, and as such it should not be changed. name
is the name that is displayed. For example, stone in the default language file is "block.minecraft.stone":"Stone"
, with block.minecraft.stone
being the identifier, and Stone
being the displayed name. Blank lines are ignored. The file needs to be valid JSON syntax, meaning it starts with a {
, has a comma after every key value pair except the last one, and ends with a }
.
Language files need to add only those lines that are changed by the pack. Any names that are not in the pack are loaded from the pack below, or default if no pack changes the names.
ModelsEdit
Models are files in JSON format with the extension .json
, which determine the shape and textures of blocks and items.
Blocks use a block state file from assets/minecraft/blockstates
to determine which model is loaded for each variant from the folder assets/minecraft/models/block
. Meanwhile, each item has an item model in assets/minecraft/models/item
to determine its model, which either loads from a block's model, contains data for its own custom model, or uses the default "flat" or "entity" model.
Models and block states used in packs below the top one are still loaded unless overridden in the top pack, which may cause some textures and models used by the top pack to no longer be loaded.
SoundsEdit
Resource packs load additional sounds with the file type of .ogg
. Each sound placed in the pack overrides the sounds from packs below, and packs also contain a file called sounds.json
which is placed within assets/minecraft
. Unlike most other files in resource packs, sounds.json
merges sound information from packs below the top pack, rather than each sounds.json
file overriding the previous completely.
TexturesEdit
For block or item textures to function, they must have equal width and height (or height that is a multiple of the width if animated); otherwise it appears as a magenta and black checkerboard. For most other textures, the file is stretched to fit the required dimensions.
Most solid blocks turn any transparent area fully opaque. Some other blocks, which have "cutout" transparency (like glass) turn all pixels that are less than 10% opaque fully transparent and all other pixels completely opaque. Every other block renders textures with semi-transparency as-is. All items and any blocks or entities which are semi-transparent by default support semi-transparency.
If a file does not exist in any resource pack, including the default, it appears as a magenta and black checkerboard texture using the colors (
#f800f8 and
#000000).
- Animation
Block and item textures support animation by placing each additional frame below the last. The animation is then controlled using a .mcmeta
file in JSON format with the same name and .png
at the end of the filename, in the same directory. For example, the .mcmeta
file for stone.png
would be stone.png.mcmeta
.
- The root tag
- animation: Contains data for the animation
- interpolate: If true, Minecraft generates additional frames between frames with a frame time greater than 1 between them. Defaults to
false
. - width: The width of the tile, as a direct ratio rather than in pixels. This is unused in vanilla's files but can be used by resource packs to have frames that are not perfect squares.
- height: The height of the tile in direct pixels, as a ratio rather than in pixels. This is unused in vanilla's files but can be used by resource packs to have frames that are not perfect squares.
- frametime: Sets the default time for each frame in increments of one game tick. Defaults to
1
. - frames: Contains a list of frames. Defaults to displaying all the frames from top to bottom.
- A number corresponding to position of a frame from the top, with the top frame being 0
- A frame specifies a frame with additional data
- index: A number corresponding to position of a frame from the top, with the top frame being 0
- time: The time in ticks to show this frame, overriding "frametime" above.
- interpolate: If true, Minecraft generates additional frames between frames with a frame time greater than 1 between them. Defaults to
- animation: Contains data for the animation
If the .mcmeta
file does not exist in the pack and the texture does, the game assumes the texture is not animated, rather than loading a .mcmeta
file from a pack below that pack. If no .mcmeta
file exists for a texture with unequal dimensions, the texture appears as a purple and black checkerboard.
- Villagers
Textures from assets/minecraft/textures/entity/villager
and assets/minecraft/textures/entity/zombie_villager
support a .mcmeta
file in JSON format containing additional effects to apply to the hat layer. The file is contained in the same directory as the texture, and has the same name as the texture, except appended with .mcmeta
. For example, the file profession/farmer.png
can have a properties file called profession/farmer.png.mcmeta
- The root tag
- villager: Contains data for the texture
- hat: Whether the villager type's hat layer should still render (default), or not
full
. [more information needed]
- hat: Whether the villager type's hat layer should still render (default), or not
- villager: Contains data for the texture
If the .mcmeta
file does not exist in the pack and the texture does, the game loads the default settings, rather than loading a .mcmeta
file from a pack below that pack.
- Colormaps
Colormaps are 256×256 pixel images which tell the game which color to use in each biome. They are located in assets/minecraft/textures/colormap
. The game contains two colormaps, foliage.png
which colors plants such as leaves (except birch and spruce) and vines, and grass.png
which colors grass and grass blocks. Colormaps can be disabled on individual blocks by removing the tintindex
tag from the block model.
- Properties
Textures from assets/minecraft/textures/misc
support a .mcmeta
file in JSON format containing additional effects to apply to the texture. The file is contained in the same directory as the texture, and has the same name as the texture, except appended with .mcmeta
. For example, the file pumpkinblur.png
can have a properties file called pumpkinblur.png.mcmeta
- The root tag
- texture: Contains data for the texture
- blur: Causes the texture to blur when viewed from close up. Defaults to
false
- clamp: Causes the texture to stretch instead of tiling in cases where it otherwise would, such as on the shadow. Defaults to
false
- mipmaps: Custom mipmap values for the texture
- blur: Causes the texture to blur when viewed from close up. Defaults to
- texture: Contains data for the texture
If the .mcmeta
file does not exist in the pack and the texture does, the game loads the default settings, rather than loading a .mcmeta
file from a pack below that pack.
TextsEdit
Three .txt
files in UTF-8 format exist in assets/minecraft/texts
which are used by the game to determine the text to display.
The file end.txt
contains the text of the end poem, using formatting codes to apply the colors to the two speakers, and with the text PLAYERNAME
being replaced with the player's name. After that file is shown, the contents of credits.txt
are shown.
The file splashes.txt
contains lines of text separated using line breaks to determine the splashes to display in-game. Any splash can be replaced with different text.
FontsEdit
A font file is a JSON file located at assets/<namespace>/font
within a resource pack and contains a list of providers that each tie a character set to a resource location along with some extra information. The default font is defined by the font minecraft:default
while the default font used by enchantment tables is defined by the font minecraft:alt
.
The resource locations given in font providers should also include the file extensions.
- The root tag
- providers: A list of providers that are merged onto this font.
- A font provider. The contents depend on the value of the
"type"
tag.- type: The type of the font provider. Can be one of the following:
- bitmap: A bitmap font.
- file: The resource location of the used file, starting from
assets/<namespace>/textures
. - height: Optional. The height of the character, measured in pixels. Can be negative. This tag is separate from the area used in the source texture and just rescales the displayed result. Default is 8.
- ascent: The ascent of the character, measured in pixels. This value adds a vertical shift to the displayed result.
- chars: A list of strings containing the characters replaced by this provider, as well as their order within the texture. All elements must describe the same number of characters. The texture is split into one equally sized row for each element of this list. Each row is split into one equally sized character for each character within one list element.
- file: The resource location of the used file, starting from
- legacy_unicode: A legacy unicode font. This format is deprecated and only prioritized when the "Force Unicode Font" option is turned on.
- sizes: The resource location inside
assets/<namespace>/font
describing a binary file describing the horizontal start and end positions for each character from 0 to 15. The file extension of the target file should be.bin
. - template: The resource location inside
assets/<namespace>/textures
that leads to the texture files that should be used for this provider. The game replaces%s
from the value of this tag with the first two characters of the hex code of the replaced characters, so a single provider of this type can point into multiple texture files.
- sizes: The resource location inside
- ttf: A TrueType font.[more information needed]
- file: The resource location of the TrueType font file within
assets/<namespace>/font
. - shift: The distance by which the characters of this provider are shifted.
- Left shift
- Downwards shift
- size: Font size to render at.
- oversample: Resolution to render at.
- skip: String or array of strings to exclude.
- file: The resource location of the TrueType font file within
- bitmap: A bitmap font.
- type: The type of the font provider. Can be one of the following:
- A font provider. The contents depend on the value of the
- providers: A list of providers that are merged onto this font.
- Default textures
The texture files of the default fonts contain a grid of white characters, which are automatically colored by Minecraft as needed in-game. The character sizes are automatically determined based on the last line of pixels containing any alpha value. Due to the way fonts are detected, filling the background of a character with a color containing a 5% alpha background causes the full width to render without having a visible background to the character.
- Glyphs 0x20 (space) through 0x7E (tilde) display the standard ASCII characters,
- Glyphs 0x7F through 0xFF display the Code page 437 characters.
The default texture is located in assets/minecraft/textures/font/ascii.png
The default texture used when displaying the enchanting "alien font" is assets/minecraft/textures/font/ascii_sga.png
Texture sheetsEdit
Minecraft generally does not store multiple different textures on sheets and instead stores them on separate files. Two current exceptions are map icons[1] and experience orbs as well as minecarts.[2]
ShadersEdit
Shaders are GLSL files that are compiled when loaded. They are used to modify the look of the game and come in two varieties, vertex and fragment. The vertex shaders modify the positions of individual vertices and are most often used to create waving foliage and water. Fragment shaders are applied to every pixel and can be used to add effects like bloom, god rays, and blur. The folder contains JSON files which link to the vertex and fragment shaders and provide info about them. If any error occurs when loading the shaders, the resource pack is unloaded and fabulous graphics are turned off.
"Post" JSONEdit
- The root tag
- targets: A list of render targets.
- : The name of a render target. The size defaults to screen resolution.
- : A render target.
- name: The name of the render target.
- width: The width of the render target.
- height: The height of the render target.
- passes: A list of passes.
- : A render pass.
- name: The name of the render pass.
- intarget: The target to use as an input.
- outtarget: The target to output to.
- auxtargets: A list of auxiliary targets.
- An auxiliary target.
- name: The auxiliary target's name that is passed into the "Program" JSON.
- id: The auxiliary target's id. Either points into the name of a buffer that is defined in
targets
or into the location of a texture underassets/<namespace>/textures/effect
. - width: Required if
id
references a texture. Describes the width of the texture in pixels. - height: Required if
id
references a texture. Describes the height of the texture in pixels. - bilinear: Required if
id
references a texture. Determines whether the scaling algorithm used for the image is bilinear or nearest neighbour.
- An auxiliary target.
- uniforms: A list of overrides that change the values in the
uniforms
list in the "Program" JSON.- : A uniform.
- name: The name of the field that should be changed.
- values: The values that the field should be changed to.
- : A uniform.
- : A render pass.
- targets: A list of render targets.
"Program" JSONEdit
- The root tag
- blend: Settings for OpenGL blending. [verify]
- func: Operator to be used when blending. [verify]
- srcrgb: Source, most likely used as
sfactor
parameter ofglBlendFunc
. - dstrgb: Destination, most likely used as
dfactor
parameter ofglBlendFunc
.
- vertex: The name (without file extension) of the vertex shader to be used.
- fragment: The name (without file extension) of the fragment shader to be used.
- attributes: Attributes to be used by the vertex shader.
- : An attribute. The only currently available value is
"Position"
.
- : An attribute. The only currently available value is
- samplers: A list of samplers that may be used in the shaders.
- : A sampler.
- name: The samplers name.
- : A sampler.
- uniforms: A list of uniforms that can be used in the shaders.
- : A uniform.
- name: The name of the uniform as referenced in the GLSL code. Some names give a uniform special behavior:
- Time: A value from 0 to 1, representing time in seconds. Resets every second.
- InSize: The width and height of the input buffer in pixels.
- OutSize: The width and height of the output buffer in pixels.
- type: The type of the uniform. Can be one of
float
,matrix4x4
,matrix3x3
andmatrix2x2
.float
can also be interpreted asvec2
,vec3
orvec4
depending on how many values are actually included invalues
. - count: The number of values included in
values
. - values: The value of the uniform, given as a list of floats. The length of the list should be the same as
count
.
- name: The name of the uniform as referenced in the GLSL code. Some names give a uniform special behavior:
- : A uniform.
- blend: Settings for OpenGL blending. [verify]
TemplateEdit
The folder structure of Vanilla Resource Pack:
List |
---|
|
Bedrock EditionEdit
Similarly to skins, resource packs can be bought or made in Bedrock Edition. As of Alpha 0.15.0, iOS users can download resource packs on the system itself with the .mcpack
and .mcworld
file names. When these files are opened, they are automatically imported into the game without any need for file system access.
HistoryEdit
Java Edition | |||||
---|---|---|---|---|---|
1.6.1 | 13w24a | Added resource packs, replacing the functionality of texture packs. Minecraft Texture Ender is available from Mojang to automatically convert 1.5 compatible texture packs to resource packs. See Java Edition 1.6.1/Resource pack changes for the list of file names changed. | |||
1.6.2 | reupload | Fixed distorted font when HD font is used.[3] | |||
1.7.2 | 13w36a | Added the ability to apply multiple resource packs at once. | |||
13w42a | Moved files from assets/minecraft/music to assets/minecraft/sounds/music and files from assets/minecraft/sound to assets/minecraft/sounds . | ||||
1.7.3 | 13w47a | The description value of pack.mcmeta can now be raw JSON text format. | |||
1.7.4 | 13w48a | Removed the ability to change the Mojang logo. | |||
1.8 | 14w06a | Added the ability to change the block models. | |||
14w07a | Resource packs can now be bundled with a map. | ||||
14w25a | The model format now supports custom item models. | ||||
Textures can now be specified for blocks and items. | |||||
Added the interpolate tag for animations. | |||||
1.8.8 | pre | Resource packs now display an error if the format number is wrong. At this time, it requires a format number of 1 . | |||
1.9 | 15w31a | Changed format number to 2 , due to changes in the model system, such as item tags, multipart, and changes to display tags.
| |||
Using resource packs with outdated display tags causes the models to seem abnormally up-scaled and the wielded block cannot be rotated in the hand, along with blocks in the inventory replaced with a 2D texture. This is similar to what happens when a model has no display tags. See here for an example. | |||||
1.11 | 16w32a | Resource packs version number changed to 3 , due to the change that all files should have lowercase letters. | |||
1.13 | 17w43a | The default resource pack can now be moved up and down, just like other resource packs. | |||
17w48a | Changed format number to 4 , due to The Flattening. | ||||
1.14 | 18w45a | Added "Programmer Art – The classic look of Minecraft" to the resource pack menu, due to the old textures being replaced by new ones in the Texture Update. | |||
19w06a | Significantly improved resource pack loading speed.[4] | ||||
Particles textures are now split into individual files. | |||||
19w07a | Painting textures are now split into individual files. | ||||
19w08a | Status effect textures are now split into individual files. | ||||
1.15 | Pre-release 1 | Changed format number to 5 , due to texture mechanic changes in earlier snapshots. | |||
1.16.2 | Release Candidate 1 | Changed format number to 6 , due to changes to wall blocks made in 1.16 according to MC-197275. | |||
Upcoming Java Edition | |||||
1.17 | 20w45a | Changed format number to 7 . | |||
Pocket Edition Alpha | |||||
0.15.0 | ? | Added the first custom in-game resource packs, Plastic and City. | |||
Bedrock Edition | |||||
1.10.0 | beta 1.10.0.3 | Resource packs are now separate from world templates and can be updated independently in existing worlds. |
TriviaEdit
- The old pack.png file was screenshotted from Alpha v1.2.2, the seed being
3257840388504953787
.[5]- The screenshot was taken approximately at X=49.16, Z=0.72, facing RX=-119.23, RY=-8.297.
- How to generate the exact same world and make the exact same screenshot: https://pastebin.com/CmsEKDev.[6]
GalleryEdit
See alsoEdit
ReferencesEdit
- ↑ https://feedback.minecraft.net/hc/en-us/community/posts/360058199792-Split-up-map-icon-textures-into-individual-files
- ↑ https://feedback.minecraft.net/hc/en-us/community/posts/360058097892-Split-up-the-experience-orb-texture-file-into-individual-sprites
- ↑ MC-17673
- ↑ "It should have already affected resource pack loading! It's all the same thing internally." – @Dinnerbone, February 7, 2019
- ↑ "Pack.PNG has been FOUND! - Here's how they did it."– SalC1 on YouTube, September 7, 2020
- ↑ https://www.reddit.com/r/MinecraftAtHome/comments/iocx6f/packpng_seed_was_found_explanation_tutorial_and