All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Variants-CIT

Variants-CIT

by Estecka • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

Variants-CIT

An alternative CIT format designed to handle large amounts of variants.

This mod excels in scenarios where one item has many variants all based on the same pieces of data. It yields better performances when extreme amounts of CITs are available, and uses a resource format that is less redundant, requiring only one short file to configure all possible variants of an item at once.

Assigning models on a case-by-case basis (similar to how Optifine-CIT handles it) is still possible, but does not boast the same performances.

Resource Pack Format

This is a quick showcase. Refer to The Wiki for a complete guide.

The format revolves around item variants being automatically associated to models or textures with matching names. Instead of defining separate conditions for every variants, you define a single rule that governs all variants in a collection, (so-called modules). This module defines what item is affected, how to figure out its variants, and where the variant models are located.

Fully automatic variants-to-model association

Here's a simple module that would change the texture of enchanted books :

{
    "items": "enchanted_book", // The affected item type(s)

    "modelPrefix": "book_cit/", // The folder containing the possible models/textures.
    "assetGen": "item_model/generated", // Auto-generate models from textures (if missing)

    "type": "stored_entchantment", // How to compute the item's "variant ID"
    "parameters": { // Extra options specific to the module's type
        "levelSeparator": "_lvl_" // Include enchantment level in the variant ID
    }
}

Here, a book with the enchantment minecraft:unbreaking at level 2 will have the variant ID minecraft:unbreaking_lvl_2, and thus use the texture stored at /assets/minecraft/textures/item/book_cit/unbreaking_lvl_2.png. This single module will work for every possible enchantment, vanilla or modded, so long as a corresponding texture exists.

Automatic variants based on custom data

The module above has a purpose-made type for enchanted books. If no type exists for a specific use-case, you can still use more generic modules to get a variant from any component:

{
    "items": "minecraft:suspicious_stew",
    "modelPrefix": "item/suspicious_stew_cit/",
    "assetGen": "item_model/generated",

    "type": "component_data",
    "parameters": {
        "componentType": "suspicious_stew_effects", // The component containing the variant ID
        "nbtPath": "[0].id" // The location of the variant ID in the component.
    }
}

Processing data that can't be used as-is:

{
    "items": "diamond_sword",

    "modelPrefix": "item/named_swords/",
    "assetGen": "item_model/handheld",

    "type": "component_data",
    "parameters":
    {
        "componentType": "custom_name",
        "transform": [
            {
                "function": "regex",
                // Pattern matching,..
                "regex": "(?i)(.*'s )?(Great |Grand )?(?<var>.*(sword|dagger))( of doom)?",
                // ... and preserve only a portion of the name.
                "substitution": "$var"
                // (E.g: "steev18's great Steel Sword" => "Steel Sword")
            }
            {
                // Turns any text into a valid identifier
                "function": "sanitize"
                // (E.g: "Steel Sword" => "minecraft:steel_sword")
            }
        ]
    }
}

Combining multiple pieces of data from different sources:

{
    "items": "minecraft:diamond_sword",
    "modelPrefix": "item/trimmed_diamond_sword/",
    "assetGen": "item_model/handheld",

    "type": "component_format",
    "parameters":
    {
        // How to combine various pieces of data into a variant ID
        // (E.g: sentry_diamond)
        "format": "${pattern}_${material}",
        // Where to find those pieces of data.
        "variables": {
            "pattern": {
                "componentType": "trim",
                "nbtPath": ".pattern"
            },
            "material": {
                "componentType": "trim",
                "nbtPath": ".material",
                "transform": "discard_namespace"
            }
        }
    }
}

Case-by-case variants

For systems that don't really follow any rules, (or if you have too few variants to care about automatism), you can use a format closer to Optifine-CIT's paradigms:

{
    "items": "trident",
    "modelPrefix": "item/godly_tridents/",
    "assetGen": "item_model/trident",

    "type": "predicates",
    "parameters": {
        "predicates":
        [
            {
                "variantId": "zeus_smite",
                "precondition": {
                    "enchantments.channeling": { "greater_or_equals": 1 }
                }
            },
            {
                "variantId": "jupiter_syphon",
                "precondition": {
                    "enchantments.riptide": { "greater_or_equals": 1 }
                }
            }
            // etc
        ]
    }
}

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
26.3
Fabric
13h ago 1
26.2 26.1.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
26.3-pre-2
Fabric
13h ago 1
26.3-pre-2
Fabric
13h ago 1
26.2 26.1.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
26.2 26.1.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
26.2 26.1.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
26.2 26.1.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
26.2 26.1.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
26.2 26.1.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
26.1.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
26.1.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
26.1.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
26.1.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.9
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.6
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.6
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.6
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.6
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.5
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.4
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.4-pre1
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.4-pre1
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
1.21.x
Fabric
13h ago 1
  • Added item property: dyed_color**.
The NBT representation of this component varies with versions of Minecraft, so using the mod's property is more reliable.
  • nbtPath keys are more lenient** and will be treated as identifiers whenever possible.
E.g: enchantments.sharpness will now work for the enchantment minecraft:sharpness.
  • Added transform: translate**.
This can be used to ensure name-based or lore-based modules remain functional regardless of the player's language.
  • Transforms whitelist, blacklist and remap now have _id and _number versions.
  • Transform remap can now output numbers.
  • Added equipment assetGen presets: horse, wolf, llama
  • Added equipment assetGen preset: ghast (MC 1.21.6+)
  • Added equipment assetGen preset: nautilus (MC 1.21.11+)
  • Added equipment layers nautilus_saddle and camel_husk_saddle to the saddle preset (MC 1.21.11+)
  • Added equipment layer humanoid_baby to the humanoid preset (MC 26.1+)
  • Added module field item (singular) as an alias for items (plural).
  • Fixed command module model-id showing a misleading message for missing intrinsic models.

  • Added item property: dyed_color**.
The NBT representation of this component varies with versions of Minecraft, so using the mod's property is more reliable.
  • nbtPath keys are more lenient** and will be treated as identifiers whenever possible.
E.g: enchantments.sharpness will now work for the enchantment minecraft:sharpness.
  • Added transform: translate**.
This can be used to ensure name-based or lore-based modules remain functional regardless of the player's language.
  • Transforms whitelist, blacklist and remap now have _id and _number versions.
  • Transform remap can now output numbers.
  • Added equipment assetGen presets: horse, wolf, llama
  • Added equipment assetGen preset: ghast (MC 1.21.6+)
  • Added equipment assetGen preset: nautilus (MC 1.21.11+)
  • Added equipment layers nautilus_saddle and camel_husk_saddle to the saddle preset (MC 1.21.11+)
  • Added equipment layer humanoid_baby to the humanoid preset (MC 26.1+)
  • Added module field item (singular) as an alias for items (plural).
  • Fixed command module model-id showing a misleading message for missing intrinsic models.

  • Added item property: dyed_color**.
The NBT representation of this component varies with versions of Minecraft, so using the mod's property is more reliable.
  • nbtPath keys are more lenient** and will be treated as identifiers whenever possible.
E.g: enchantments.sharpness will now work for the enchantment minecraft:sharpness.
  • Added transform: translate**.
This can be used to ensure name-based or lore-based modules remain functional regardless of the player's language.
  • Transforms whitelist, blacklist and remap now have _id and _number versions.
  • Transform remap can now output numbers.
  • Added equipment assetGen presets: horse, wolf, llama
  • Added equipment assetGen preset: ghast (MC 1.21.6+)
  • Added equipment assetGen preset: nautilus (MC 1.21.11+)
  • Added equipment layers nautilus_saddle and camel_husk_saddle to the saddle preset (MC 1.21.11+)
  • Added equipment layer humanoid_baby to the humanoid preset (MC 26.1+)
  • Added module field item (singular) as an alias for items (plural).
  • Fixed command module model-id showing a misleading message for missing intrinsic models.

  • Added item property: dyed_color**.
The NBT representation of this component varies with versions of Minecraft, so using the mod's property is more reliable.
  • nbtPath keys are more lenient** and will be treated as identifiers whenever possible.
E.g: enchantments.sharpness will now work for the enchantment minecraft:sharpness.
  • Added transform: translate**.
This can be used to ensure name-based or lore-based modules remain functional regardless of the player's language.
  • Transforms whitelist, blacklist and remap now have _id and _number versions.
  • Transform remap can now output numbers.
  • Added equipment assetGen presets: horse, wolf, llama
  • Added equipment assetGen preset: ghast (MC 1.21.6+)
  • Added equipment assetGen preset: nautilus (MC 1.21.11+)
  • Added equipment layers nautilus_saddle and camel_husk_saddle to the saddle preset (MC 1.21.11+)
  • Added equipment layer humanoid_baby to the humanoid preset (MC 26.1+)
  • Added module field item (singular) as an alias for items (plural).
  • Fixed command module model-id showing a misleading message for missing intrinsic models.

  • Added item property: dyed_color**.
The NBT representation of this component varies with versions of Minecraft, so using the mod's property is more reliable.
  • nbtPath keys are more lenient** and will be treated as identifiers whenever possible.
E.g: enchantments.sharpness will now work for the enchantment minecraft:sharpness.
  • Added transform: translate**.
This can be used to ensure name-based or lore-based modules remain functional regardless of the player's language.
  • Transforms whitelist, blacklist and remap now have _id and _number versions.
  • Transform remap can now output numbers.
  • Added equipment assetGen presets: horse, wolf, llama
  • Added equipment assetGen preset: ghast (MC 1.21.6+)
  • Added equipment assetGen preset: nautilus (MC 1.21.11+)
  • Added equipment layers nautilus_saddle and camel_husk_saddle to the saddle preset (MC 1.21.11+)
  • Added equipment layer humanoid_baby to the humanoid preset (MC 26.1+)
  • Added module field item (singular) as an alias for items (plural).
  • Fixed command module model-id showing a misleading message for missing intrinsic models.

  • Added item property: dyed_color**.
The NBT representation of this component varies with versions of Minecraft, so using the mod's property is more reliable.
  • nbtPath keys are more lenient** and will be treated as identifiers whenever possible.
E.g: enchantments.sharpness will now work for the enchantment minecraft:sharpness.
  • Added transform: translate**.
This can be used to ensure name-based or lore-based modules remain functional regardless of the player's language.
  • Transforms whitelist, blacklist and remap now have _id and _number versions.
  • Transform remap can now output numbers.
  • Added equipment assetGen presets: horse, wolf, llama
  • Added equipment assetGen preset: ghast (MC 1.21.6+)
  • Added equipment assetGen preset: nautilus (MC 1.21.11+)
  • Added equipment layers nautilus_saddle and camel_husk_saddle to the saddle preset (MC 1.21.11+)
  • Added equipment layer humanoid_baby to the humanoid preset (MC 26.1+)
  • Added module field item (singular) as an alias for items (plural).
  • Fixed command module model-id showing a misleading message for missing intrinsic models.

  • Trim textures that are applied via Variants-CIT no longer require their own mcmeta file. (The auto-generated trim models now include a fallback palette used on textures that don't already have their own palette.)
  • Ported to MC 26.3-pre-2

In this version of Minecraft, each trim texture requires its own mcmeta file. This replaces the armor_trim atlas of previous versions:
``json
{
"palette" : {
"base_palette" : "trim_base"
}
}
``
  • The module type predicates no longer requires a modelPrefix or modelList to operate.** Simply use "modelId": instead of "variantId": in that module's parameters.
  • Added commands module variant-id and module model-id to debug specific models within a module.
  • Command module dump now show the same output for every module type.
  • Fixed crash when trying to encode a non-encodable component.
  • The module type predicates no longer requires a modelPrefix or modelList to operate.** Simply use "modelId": instead of "variantId": in that module's parameters.
  • Added commands module variant-id and module model-id to debug specific models within a module.
  • Command module dump now show the same output for every module type.
  • Fixed crash when trying to encode a non-encodable component.
  • The module type predicates no longer requires a modelPrefix or modelList to operate.** Simply use "modelId": instead of "variantId": in that module's parameters.
  • Added commands module variant-id and module model-id to debug specific models within a module.
  • Command module dump now show the same output for every module type.
  • Fixed crash when trying to encode a non-encodable component.
  • The module type predicates no longer requires a modelPrefix or modelList to operate.** Simply use "modelId": instead of "variantId": in that module's parameters.
  • Added commands module variant-id and module model-id to debug specific models within a module.
  • Command module dump now show the same output for every module type.
  • Fixed crash when trying to encode a non-encodable component.
  • The module type predicates no longer requires a modelPrefix or modelList to operate.** Simply use "modelId": instead of "variantId": in that module's parameters.
  • Added commands module variant-id and module model-id to debug specific models within a module.
  • Command module dump now show the same output for every module type.
  • Fixed crash when trying to encode a non-encodable component.
  • Fixed number-like components not automatically casting to string.
  • Commands under module now shows info on modules that failed to load.
  • Added "expect":"snbt" for parity with v2. (Still, prefer using get_snbt on this version.)
  • Fixed number-like components not automatically casting to string.
  • Commands under module now shows info on modules that failed to load.
  • Added "expect":"snbt" for parity with v2. (Still, prefer using get_snbt on this version.)
  • Fixed number-like components not automatically casting to string.
  • Commands under module now shows info on modules that failed to load.
  • Added "expect":"snbt" for parity with v2. (Still, prefer using get_snbt on this version.)
  • Fixed number-like components not automatically casting to string.
  • Commands under module now shows info on modules that failed to load.
  • Added "expect":"snbt" for parity with v2. (Still, prefer using get_snbt on this version.)
  • Fixed number-like components not automatically casting to string.
  • Commands under module now shows info on modules that failed to load.
  • Added "expect":"snbt" for parity with v2. (Still, prefer using get_snbt on this version.)
  • Added "expect":"snbt" as an equivalent of v5's get_snbt
  • Fixed priority working in reverse order.** (Bug introduced in v5.0.0)
  • Command crawl now gives more informations about skipped modules.
  • Command crawl no longer list internal module types.
  • Fixed priority working in reverse order.** (Bug introduced in v5.0.0)
  • Command crawl now gives more informations about skipped modules.
  • Command crawl no longer list internal module types.
  • Fixed priority working in reverse order.** (Bug introduced in v5.0.0)
  • Command crawl now gives more informations about skipped modules.
  • Command crawl no longer list internal module types.
  • Fixed priority working in reverse order.** (Bug introduced in v5.0.0)
  • Command crawl now gives more informations about skipped modules.
  • Command crawl no longer list internal module types.
  • Fixed priority working in reverse order.** (Bug introduced in v5.0.0)
  • Command crawl now gives more informations about skipped modules.
  • Command crawl no longer list internal module types.
  • Fixed gui lighting on custom shields

  • Fixed gui lighting on custom shields

  • Fixed gui lighting on custom shields

  • Fixed gui lighting on custom shields

  • Fixed gui lighting on custom shields

  • Added hook: trim_pattern (See: [Wiki](https://github.com/Estecka/mc-Variants-CIT/wiki/Equipped-Armor#trim-patterns))
  • Added options modelNamespace and modelPathes, as a way to further restrict what models can be collected by modelPrefix
  • Added option modelList as a plainer alternative to modelPrefix, intended for modules with few variants.
  • Added assetGen preset: item_model/shield_no_pattern.
  • Added command modultree crawl, to help figure out which module succesfully applied to an item, which ones failed, and by inference, which ones were skipped.
  • Asset generator's inputPath now defaults to ^.*$ instead of .*, fixing weird substitutions when using $0 in outputPath
Variants-CIT Icon
Download Variants-CIT
Select game version
Select platform