Skip to content

How it works

Excederus edited this page Aug 24, 2026 · 3 revisions

File Locations

For mods

Patches: ~/assets/yourmodid/shaderpatcher/patches/

Mappings: ~/assets/yourmodid/shaderpatcher/mappings/

Transforms: ~/assets/yourmodid/shaderpatcher/transforms/

For modpacks

Patches: ~/config/shaderpatcher/patches/

Mappings: ~/config/shaderpatcher/mappings/

Transforms: ~/config/shaderpatcher/transforms/

Files & Filenames

Files

Patch Files

Patch files hold the values of your modded blocks, items or entites - listed under MappingKeys.

Mapping Files

Mapping files hold the vanilla target that the modded values with a matching MappingKey should be inserted to.

Transform Files

Transform files hold transformation instructions that will be applied to BOTH patch values and mapping values with a matching MappingKey

Filenames

All files follow the same filename convention - no matter if it's a patch, mapping or transform. If a file does not follow this convention it will be rejected during loading stage.

TYPE.MODID.yaml

  • TYPE can be block, item or entity - this will determine which shaderpack properties file should be targeted
  • MODID has to be the specific mod this file is for (MODID can also be _default, however this is only available for modpack developers)
  • yaml is the file extension (yml is also supported)

Additionally the MODID in the filename is also automatically prepended onto any value inside a patch file - this makes it easier to write patch files since you don't have to write examplemod:exampleblock and instead can just write exampleblock (this does not happen for mapping and transform files)

The MappingKey

The MappingKey is what Shader Patcher uses to identify values and targets across the files.

The MappingKey consists of 3 parts:

  • CATEGORY (required)
  • CONCEPT (required)
  • VARIANT (optional)

The actual MappingKey can be whatever you want, as long as it matches across the Patch, Mapping and Transform files of the matching TYPE.

Example

ExampleMod adds the block example_grass as a short grass variant to the game - to properly use Shader Patcher to add this block to any shader you need at least a Patch file and a Mapping file.

Block Patch File

waving:
  grass:
    short:
      - example_grass

Block Mapping File

waving:
  grass:
    short:
      - grass

In both files the MappingKey has to be the same so Shader Patcher knows that these are linked.

  • waving is the CATEGORY
  • grass is the CONCEPT
  • short is the VARIANT

The actual names of the MappingKey could also be funny, ground, green - they just have to match across the files.

Clone this wiki locally