> For the complete documentation index, see [llms.txt](https://guide.elitefantasy.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.elitefantasy.net/resourcepack-guide/beginning/atlases.md).

# atlases

The atlas is how Minecraft loads textures into the resource pack, which speeds up loading and discards unnecessary elements. For example, by default, it only loads textures that are inside `item/` and `block/`

```
📦resource_pack.zip
  └── 📁assets
       └── 📁minecraft
           └── 📁atlases
               ├── 📑armor_trims.json
               ├── 📑banner_patterns.json
               ├── 📑beds.json
               ├── 📑blocks.json
               ├── 📑items.json
               ├── 📑chests.json
               ├── 📑decorated_pot.json
               ├── 📑gui.json
               ├── 📑map_decorations.json
               ├── 📑mob_effects.json
               ├── 📑paintings.json
               ├── 📑particles.json
               ├── 📑shield_patterns.json
               ├── 📑shulker_boxes.json
               └── 📑signs.json
```

## Examples

{% hint style="danger" %}
In 1.21.11, `blocks.json` was split into `blocks.json` and `items.json`, and each must be used respectively.
{% endhint %}

You will mainly use this to be able to add textures outside the `item/` and `block/` paths

For example for this

```
📦resource_pack.zip
  └── 📁assets
       ├── 📁minecraft
       │    └── 📁items
       │        └── 📑apple.json
       └── 📁elitefantasy
            ├── 📁models
            │     └── 📁custom
            │          └── 📁items
            │               └── 📁food
            │                    └── 📑apple_eat_1.json
            └── 📁textures
                 └── 📁custom
                      └── 📁items
                           └── 📁food
                                └── 🎨apple_eat_1.png
```

It would not work since I am starting from the `custom/` directory so I need to go to the `items.json` atlases and place something like

{% hint style="warning" %}
In versions prior to 1.21.11, you must use `blocks.json`
{% endhint %}

```json
{
    "sources": [
        {
            "type": "minecraft:single",
            "resource": "elitefantasy:custom/items/food/apple_eat_1"
        }
    ]
}
```

that will specifically load that exception, but to avoid this kind of problems, it is better just to add that everything inside the `custom/` folder is automatically added to the atlas

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

### Paletted Permutations

Paletted permutations is a way that Minecraft added to be able to create new textures with new colors from a base and a palette of colors

```
📦resource_pack.zip
  └── 📁assets
       └── 📁minecraft
            ├── 📁atlases
            │     └── 📑armor_trims.json
            └── 📁textures
                 └── 📁trims
                      ├── 📁color_palettes
                      │     └── 🎨amethyst.png
                      └── 📁entity
                           └── 📁humanoid
                                └── 🎨dune.png
```

`armor_trims.json`

```json
{
  "sources": [
    {
      "type": "minecraft:paletted_permutations",
      "palette_key": "minecraft:trims/color_palettes/trim_palette",
      "permutations": {
        "amethyst": "minecraft:trims/color_palettes/amethyst"
      },
      "textures": [
        "minecraft:trims/entity/humanoid/dune"
      ]
    }
  ]
}
```

And the result will be exported to `<base_texture>_<permutation>` in this case `minecraft:trims/entity/humanoid/dune_amethyst`

{% file src="/files/AGcIzLVS3rzGguDUOUyS" %}
The base texture from which to start replacing the pixels.
{% endfile %}

{% file src="/files/JkdIEKwQ9rH9EB2ZzFPs" %}
amethyst\_color\_palette
{% endfile %}

{% file src="/files/M1LfiNWxHvzH3OT3PLvQ" %}
dune
{% endfile %}

{% hint style="info" %}
To see better the generated textures, you can use `F3 + S`, go to the folder I provided you and enter the corresponding atlas.
{% endhint %}

This can also be used in Items. An example would be this:

```
📦resource_pack.zip
  └── 📁assets
       └── 📁minecraft
            └──📁atlases
                └── 📑items.json
```

`items.json`

{% hint style="warning" %}
In versions prior to 1.21.11, you must use `blocks.json`
{% endhint %}

```json
{
    "sources": [
        {
            "type": "minecraft:paletted_permutations",
            "palette_key": "minecraft:trims/color_palettes/trim_palette",
            "permutations": {
                "amethyst": "minecraft:trims/color_palettes/amethyst"
            },
            "textures": [
                "minecraft:trims/items/helmet_trim",
                "minecraft:trims/items/chestplate_trim",
                "minecraft:trims/items/leggings_trim",
                "minecraft:trims/items/boots_trim"
            ]
        }
    ]
}
```
