Information

Several Minecraft versions ago, in snapshot 22w46a, a new directory atlas system has been introduced for resource packs. Although a breaking change and something new to wrap your head around, they stitch all your textures into one large sprite sheet at run time to help with pack stability, loading times, and performance.

Fundamentals

If multiple directories include the same file, they will be merged by their order within the pack. The order of your atlas configuration is the order it will run in, during pack load, which will add or remove new files to the texture list, which will then be later used by your models, paintings, particles, etc.

Valid Entries In An Atlas

blocks

Textures used by block and item models.

banner_patterns, beds, chests, shield_patterns, shulker_boxes, signs

Used to render special case models

mob_effects

Textures used for effect icons in the UI.

paintings

Textures used for paintings

particles

Textures used for particles.

For most resource packs with minimal complexity, the blocks entry will cover a majority of your pack.

Types of Sources

directory

  • source - directory in the pack (relative to /textures/)

  • prefix - string added to the sprite name when loaded

Adds all files in a directory and its subdirectories across all namespaces.

single

  • resource - location of a resource (relative to /textures/)

  • sprite - sprite name (optional; if not supplied it will default to resource)

Adds a single file.

filter

  • namespace, path - patterns (regular expressions) of IDs to be REMOVED

Removes sprites matching the given pattern.

unstitch

  • resource - location of a resource (relative to /textures/; .png is implied)

  • divisor_x, divisor_y - determines the units used by regions

  • regions - list of regions to copy from the source image
    sprite - sprite name (optional)
    x, y - coords of the top left corner of the region
    width, height - size of the region

Copies rectangular regions from other images

Atlas Updater (Optional Automation)

Atlas updater is a neat automation tool that will create an atlas configuration for a specific resource pack, click here to download.

Python is required to the script, which can be downloaded from the official python website.

To use this, place the downloaded python script into your /.minecraft/resourcepacks/ folder and double click to run it. By default, atlas updater will create a configuration setup on directories; to change this go to the settings and change it to singles mode. Otherwise press 1 to configure a new atlas. You'll next need to press the number for your pack, press entier, and then you will recieve a message that your atlas has been successfully generated.

Creating an Atlas Configuration Manually (Recommended to Learn)

Step 1: Creating a New Directory

Navigate within your resource pack to /assets/minecraft and create a new directory named atlases . Now your resource pack, if used in Minecraft 1.19.3 or above, will be able to use and ready and any atlas configures placed within this directory.

Step 2: Adding a Directory

For the most part, a blocks atlas will cover a majority of the resource pack's textures. If you encounter other issues, or know that you'll need to setup another entry, refer to the entries table above. Create a new file named blocks.json within the new directory you just made.

Inside of our blocks.json add the following code:

{
    "sources": [
        {   "type": "directory",
            "source": "custom",
            "prefix": "custom/"
        }
    ]
}

This would add all the textures within your custom directories (in any namespace, i.e. /assets/minecraft/custom/ ) and keep them with the same prefix custom. A sapphire sword within /assets/minecraft/textures/custom/sapphire_sword.png would be available to use as minecraft:custom/sapphire_sword .

Example: If a pack had a ruby sword file /assets/jeqo/textures/swords/ruby_sword.png , you should add a directory type entry with the source set to custom, and the prefix set custom, then the texture would now be available as jeqo:custom/ruby_sword .

Step 3: Adding Singles (Optional, Not Common)

To add a single file, add the following code to your atlas;

{
    "sources": [
        {   "type": "single",
            "source": "custom/swords/",
            "sprite": "ruby-sword"
        }
    ]
}

Step 4: Filtering (Optional, Not Common)

To filter, or remove a certain directory or file, add the following code to your atlas.

{
    "sources": [
        { "type": "filter",  
          "namespace": "custom"
        }
    ]
}

Filters out the entire custom namespace and all the textures within every subdirectory.

{
    "sources": [
        {   "type": "filter", 
             "path": "custom/swords/dungeon/gem/ruby-sword.png"
        }
    ]
}

Filters out the ruby sword located deep within our custom namespace.

Step 5: Unstitching (Optional)

Black magic that is not known much yet, not needed either.

Example Atlas Configurations with Multiple Entries

{
    "sources": [
        {   "type": "directory",
            "source": "entity",
            "prefix": "entity/"
        },
        {   "type": "directory",
            "source": "custom",
            "prefix": "custom/"
        },
        {   "type": "single",
            "source": "custom/swords/",
            "sprite": "ruby-sword"
        }
    ]
}

ModelEngines Atlas

{
    "sources": [
        {   "type": "directory",
            "source": "entity",
            "prefix": "entity/"
        }
    ]
}

Copyright MCModels ©2023.

We use cookies and similar technologies to ensure you get the best experience on our website.