Atlas

Jump to navigation Jump to search
This feature is exclusive to Java Edition.
 
It has been suggested that this page be merged with Texture atlas.
 [discuss]
If this merge affects many pages or may potentially be controversial, do not merge the page until a consensus is reached.

Atlases are configuration files in resource packs, that control which textures are included in the atlases.

JSON format[edit | edit source]

Atlases are stored as JSON files in a resource pack in the assets/<namespace>/atlases folder.

  • [NBT Compound / JSON Object] The root tag.
    • [NBT List / JSON Array] 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 / JSON Object] Source element.
        • [String] type: The type of the sprite source. Can be one of the following:
          • directory: Lists all files in a directory and its subdirectories, across all namespaces.
            • [String] source: Directory in pack to be listed (relative to textures directory).
            • [String] prefix: String to be prefixed to the sprite name when loaded.
          • single: Adds a single file.
            • [String] resource: Location of a resource within the pack (relative to textures directory, implied .png extension).
            • [String] sprite: Sprite name (optional, defaults to the value of resource).
          • filter: Removes sprites matching the given pattern (only works for entries already in the list).
            • [NBT Compound / JSON Object] pattern
              • [String] namespace: Regular expression of the namespace indentificator to be removed, if omitted, any value is matched.
              • [String] path: Regular expression of the path to be removed, if omitted, any value is matched.
          • unstitch: Copies rectangular regions from other images.
            • [String] resource: Location of a resource within the pack (relative to textures directory, implied .png extension).
            • [Double] divisor_x: Used for determining the units used by in the x coordinate of regions.
            • [Double] divisor_y: Used for determining the units used by in the y coordinate of regions.
            • [NBT List / JSON Array] regions: List of regions to copy from the source image.
              • [String] sprite: Specifies the sprite name.
              • [Double] x: Specifies the x coordinate of the top-left corner of the region.
              • [Double] y: Specifies the y coordinate of the top-left corner of the region.
              • [Double] width: Specifies the width of the region.
              • [Double] height: Specifies the height of the region.
          • paletted_permutations: Dynamically generate textures in-memory with color sets.
            • [NBT List / JSON Array] textures: A list of namespaced resource locations of base textures. These textures are used to generate variants of them that have been modified by color palettes.
            • [String] separator: A value that is used when joining texture and permutation names to produce sprite name. Defaults to _.
            • [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 Compound / JSON Object] permutations: A map of permutations from prefix to a namespaced resource location of a color palette file. The prefix is appended at the beginning to the resource location of the output variant textures, with a _ character separating the prefix 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.

List of atlases[edit | edit source]

  • armor_trims
  • banner_patterns
  • beds
  • blocks
  • chests
  • decorated_pot
  • gui
  • map_decorations
  • mob_effects
  • paintings
  • particles
  • shield_patterns
  • shulker_boxes
  • signs

History[edit | edit source]

[hide]Java Edition
1.19.322w46aAdded atlases to resource packs.
23w04aAdded sprite source paletted_permutations.
1.19.423w04aAdded armor_trims atlas.
Pre-release 1Added decorated_pot atlas.
1.20.223w31aAdded gui atlas.
1.20.524w12aAdded map_decorations atlas.
1.21.525w04aminecraft:paletted_permutations sprite source has a new field, separator.

Navigation[edit | edit source]