Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Atlas: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: updated from Minecraft
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
It is not possible to define custom atlases simply by creating the JSON file for one as atlases must be registerred in the game code. Unknown atlas files are ignored by the game when loading resources.
It is not possible to define custom atlases simply by creating the JSON file for one as atlases must be registerred in the game code. Unknown atlas files are ignored by the game when loading resources.


=== JSON format ===
== JSON format ==


<div class="treeview">
<div class="treeview">
*{{nbt|compound}} The root tag.
*{{nbt|compound}} The root tag.
**{{nbt|list|sources}}: Contains a list of sprite sources. Every entry runs in during load, in order of definition, adding or removing new textures to the atlas.
**{{nbt|list|sources}}: Contains a list of sprite sources. Every entry runs in during load, in order of definition, adding or removing new textures to the atlas.
***{{nbt|compound}} Source element.
***{{nbt|compound}} A sprite source.
****{{nbt|string|type}}: The type of the sprite source. Can be one of the following:
****{{nbt|string|type}}: The [[Minecraft:Identifier]] of a sprite source. See {{slink||Sprite source types}}
*****''directory'': Lists all files in a directory and its subdirectories, across all namespaces.
**** Additional fields depending on value of {{code|type}}
******{{nbt|string|source}}: Directory in pack to be listed (relative to {{code|textures}} directory).
</div>
******{{nbt|string|prefix}}: String to be prefixed to the sprite name when loaded.
 
*****''single'': Adds a single file.
=== Sprite source types ===
******{{nbt|string|resource}}: Location of a resource within the pack (relative to {{code|textures}} directory, implied {{code|.png}} extension).
 
******{{nbt|string|sprite}}: Sprite name (optional, defaults to the value of {{code|resource}}).
==== {{code|minecraft:directory}} ====
*****''filter'': Removes sprites matching the given pattern (only works for entries already in the list).
 
******{{nbt|compound|pattern}}
Lists all files in a directory and its subdirectories, across all namespaces.
*******{{nbt|string|namespace}}: {{W|Regular expression}} of the namespace identificator to be removed, if omitted, any value is matched.
 
*******{{nbt|string|path}}: Regular expression of the path to be removed, if omitted, any value is matched.
<div class="treeview">
*****''unstitch'': Copies rectangular regions from other images.
*{{nbt|compound}} The root compound
******{{nbt|string|resource}}: Location of a resource within the pack (relative to {{code|textures}} directory, implied {{code|.png}} extension).
**{{nbt|string|type}}: {{code|minecraft:directory}}
******{{nbt|double|divisor_x}}: Used for determining the units used by in the {{code|x}} coordinate of regions.
**{{nbt|string|source}}: Directory in pack to be listed (relative to {{code|textures}} directory).
******{{nbt|double|divisor_y}}: Used for determining the units used by in the {{code|y}} coordinate of regions.
**{{nbt|string|prefix}}: String to be prefixed to the sprite name when loaded.
******{{nbt|list|regions}}: List of regions to copy from the source image.
</div>
*******{{nbt|string|sprite}}: Specifies the sprite name.
 
*******{{nbt|double|x}}: Specifies the {{code|x}} coordinate of the top-left corner of the region.
==== {{code|minecraft:single}} ====
*******{{nbt|double|y}}: Specifies the {{code|y}} coordinate of the top-left corner of the region.
 
*******{{nbt|double|width}}: Specifies the width of the region.
Adds a single sprite to the atlas.
*******{{nbt|double|height}}: Specifies the height of the region.
 
*****''paletted_permutations'': Dynamically generate textures in-memory with color sets.
<div class="treeview">
******{{nbt|list|textures}}: A list of namespaced [[Minecraft:resource location]]s of base textures. These textures are used to generate variants of them that have been modified by color palettes.
*{{nbt|compound}} The root compound
******{{nbt|string|separator}}: A value that is used when joining texture and permutation names to produce sprite name. Defaults to {{cd|_}}.
**{{nbt|string|type}}: {{code|minecraft:single}}
******{{nbt|string|palette_key}}: A namespaced resource location of a color palette key file. This is used to define the set of key pixel colors to swap out with the color palettes defined.
**{{nbt|string|resource}}: The [[Minecraft:Identifier|identifier]] of a resource (relative to {{code|textures}} directory, implied {{code|.png}} extension).
******{{nbt|compound|permutations}}: A map of permutations from suffix to a namespaced resource location of a color palette file. The suffix is appended to the resource location of the output variant textures, with the string specified in <code>separator</code> separating the suffix and the base texture name. The number of pixels in each color palette must be the same as that of the palette_key defined for this source. Pixels are compared by RGB value. The alpha channel is ignored for key matching, but in the resulting texture the alpha channel is multiplied with the color palette's alpha channel. Pixels that do not match the palette_key are copied over to the resulting texture as-is.
**{{nbt|string|sprite}}: Name (as an [[Minecraft:Identifier|identifier]]) of the sprite that is added to the atlas (optional, defaults to the value of {{code|resource}}).
</div>
 
==== {{code|minecraft:filter}} ====
 
Removes sprites whose [[Minecraft:Identifier|identifier]] match the given {{Wikipedia|Regular expression}} pattern (only works for entries in packs with a lower priority to the current one {{verify|I'm pretty sure this is how it works, but need to verify it}}).
 
<div class="treeview">
*{{nbt|compound}} The root compound
**{{nbt|string|type}}: {{code|minecraft:filter}}
**{{nbt|string|namespace}}: Regular expression of the namespace to be removed. If omitted, any value is matched.
**{{nbt|string|path}}: Regular expression of the path to be removed. If omitted, any value is matched.
</div>
 
==== {{code|minecraft:unstitch}} ====
 
Copies rectangular regions from other images and adds them to the atlas with the specified names.
 
<div class="treeview">
*{{nbt|compound}} The root compound
**{{nbt|string|type}}: {{code|minecraft:unstitch}}
**{{nbt|string|resource}}: The [[Minecraft:Identifier|identifier]] of a resource (relative to {{code|textures}} directory, implied {{code|.png}} extension).
**{{nbt|double|divisor_x}}: Used for determining the units used by in the {{code|x}} coordinate of regions.
**{{nbt|double|divisor_y}}: Used for determining the units used by in the {{code|y}} coordinate of regions.
**{{nbt|list|regions}}: List of regions to copy from the source image.
***{{nbt|string|sprite}}: Name (as an [[Minecraft:Identifier|identifier]]) of the sprite that is added to the atlas.
***{{nbt|double|x}}: Specifies the {{code|x}} coordinate of the top-left corner of the region.
***{{nbt|double|y}}: Specifies the {{code|y}} coordinate of the top-left corner of the region.
***{{nbt|double|width}}: Specifies the width of the region.
***{{nbt|double|height}}: Specifies the height of the region.
</div>
 
==== {{code|minecraft:paletted_permutations}} ====
 
Dynamically generate sprites in-memory from a set of color palettes and base textures.
 
<div class="treeview">
*{{nbt|compound}} The root compound
**{{nbt|string|type}}: {{code|minecraft:paletted_permutations}}
**{{nbt|list|textures}}: A list of [[Minecraft:Identifier|identifiers]] of resources (relative to {{code|textures}} directory, implied {{code|.png}} extension). These textures are used to generate variants of them that have been modified by color palettes.
**{{nbt|string|separator}}: A value that is used when joining texture and permutation names to produce sprite name. Defaults to {{cd|_}}.
**{{nbt|string|palette_key}}: An [[Minecraft:Identifier|identifier]] (relative to {{code|textures}} directory{{until|je 26.3}}. {{INUpcoming|je 26.3}} relative to {{code|textures/palettes}} directory. Implied {{code|.png}} extension) of a color palette key texture. This is used to define the set of key pixel colors to swap out with the color palettes defined.
**{{nbt|compound|permutations}}: A map of permutations from suffix string to an [[Minecraft:Identifier|identifier]] (relative to {{code|textures}} directory{{until|je 26.3}}. {{INUpcoming|je 26.3}} relative to {{code|textures/palettes}} directory. Implied {{code|.png}} extension) of a color palette file. The suffix is appended to the identifier of the output variant textures, with the string specified in <code>separator</code> separating the suffix and the base texture name. The number of pixels in each color palette must be the same as that of the {{code|palette_key}} defined for this source. Pixels are compared by RGB value. The alpha channel is ignored for key matching, but in the resulting texture the alpha channel is multiplied with the color palette's alpha channel. Pixels that do not match the {{code|palette_key}} are copied over to the resulting texture as-is.
</div>
</div>


Line 58: Line 100:
|-
|-
| armor_trims
| armor_trims
| Contains paletted pemutations of all armor trim equipment textures. This does not include the item overlays, those are defined in the <code>items</code> atlas.
| Contains paletted permutations of all armor trim equipment textures. This does not include the item overlays, those are defined in the <code>items</code> atlas.
| Rendering of armor trim layers on equipment
| Rendering of armor trim layers on equipment
| {{tc|No}}
| {{tc|No}}
Line 141: Line 183:
|{{HistoryLine|||dev=snap7|Removed the <code>signs</code> atlas.}}
|{{HistoryLine|||dev=snap7|Removed the <code>signs</code> atlas.}}
|{{HistoryLine|java upcoming}}
|{{HistoryLine|java upcoming}}
|{{HistoryLine||26.3|dev=snap1|Removed the <code>armor_trims</code> atlas.}}
|{{HistoryLine||26.3|dev=snap1|Removed the <code>armor_trims</code> atlas.
|For the {{code|paletted_permutations}} sprite source, palette texture identifiers in the {{code|palette_key}} and {{code|permutations}} fields now resolve to {{code|<namespace>:textures/palettes/<path>.png}} rather than {{code|<namespace>:textures/<path>.png}}.
}}
}}
}}



Latest revision as of 11:00, 8 September 2026

Template:Move Template:Exclusive

An atlas is effectively a collection of individual sprites that are combined into one large image when resource packs are loaded. In Minecraft, these are used by various objects such as terrain, items, most gui widgets, and certain block entity textures.

Specification

The sprites that are included in an atlas are controlled by json files in a Minecraft:resource pack. These are stored in the assets/<namespace>/atlases/<id>.json directory of a resource pack with the following format.

When loading atlas files, the game combines all sprite sources from all currently active packs for each atlas. This means that multiple packs can add or remove sprites from an atlas without conflicting with one another.

It is not possible to define custom atlases simply by creating the JSON file for one as atlases must be registerred in the game code. Unknown atlas files are ignored by the game when loading resources.

JSON format

Sprite source types

Template:Code

Lists all files in a directory and its subdirectories, across all namespaces.

Template:Code

Adds a single sprite to the atlas.

Template:Code

Removes sprites whose identifier match the given Template:Wikipedia pattern (only works for entries in packs with a lower priority to the current one Template:Verify).

Template:Code

Copies rectangular regions from other images and adds them to the atlas with the specified names.

Template:Code

Dynamically generate sprites in-memory from a set of color palettes and base textures.

List of atlases

All the atlases that are currently used by the game.

For atlases which support Template:Wikipedia, all sprites should be a minimum of 16x16 pixels in size and a multiple of 2. If these guidelines aren't met the maximum mipmap level is limited and a message is printed in the log along the lines of 'Texture <sprite id> with size <width>x<height> limits mip level from <target mip level> to <limited mip level>'.

Identifier Contents Used for Supports mipmapping
armor_trims Contains paletted permutations of all armor trim equipment textures. This does not include the item overlays, those are defined in the items atlas. Rendering of armor trim layers on equipment Template:Tc
banner_patterns Contains all banner pattern textures and the base banner texture from the entity/banner/ directory. Rendering of banners placed in the world Template:Tc
blocks Contains all block textures from the block/, textures in the entity/conduit/ directory, the entity/bell/bell_body.png texture, and the entity/enchantment/enchanting_table_book.png texture. Rendering of terrain, conduits, bells, enchanting table books (in the gui and in the world), and item models. Template:Tc
celestials Contains the environment/celestial/ directory. This includes the sun texture, moon phase textures, and the end flash texture. Rendering of celestial bodies like the sun, moon, and end flashes. Template:Tc
chests Contains all the chest textures from the entity/chest/ directory. Rendering of chest block entities. Template:Tc
decorated_pot Contains all decorated pot patterns and the base decorated pot texture from the entity/decorated_pot/ directory. Rendering of decorated pot block entities. Template:Tc
gui Contains most gui sprite textures from the gui/sprites/ directory. Also contains the mob effect icons from the mob_effect/ directory. Sprites in this atlas support additional mcmeta data for gui scaling, see Minecraft:Resource_pack#GUI for more information. Rendering of most gui widgets and icons. Template:Tc
items Contains all item textures from the item/ directory. Also contains paletted permutations for the armor trim item overlay textures. Rendering of item models. Template:Tc
map_decorations Contains all map decoration icons from the map/decoration/ directory. Rendering of map decoration icons. Template:Tc
paintings Contains all painting textures from the painting/ directory. Rendering of paintings. Template:Tc
particles Contains all particle textures from the particle/ directory. Rendering of most particles. Template:Tc
shield_patterns Contains all shield pattern textures and the base shield texture from the entity/shield/ directory. Rendering of shields and shield patterns. Template:Tc
shulker_boxes Contains all shulker textures from the entity/shulker/ directory. Rendering of shulker box block entities. This does not include shulker mobs. Template:Tc

History

Template:HistoryTable

Navigation

Template:Navbox resource packs Template:Navbox Java Edition technical

Minecraft:de:Atlasdaten Minecraft:ja:テクスチャ#テクスチャアトラス Minecraft:zh:纹理图集