What are you searching for?

Variants-CIT
Variants-CIT

Variants-CIT

Alternative CIT format for large collections of variants with repeating patterns.

download 537.0K Downloads · favorite 289 Followers · Updated 6 days ago
Fabric Library Optimization Utility 1.21 1.21.1 1.21.2 1.21.3 1.21.4-pre1 +8 more

Versions

inventory_2
Variants-CIT 2.17.1+1.21.1

2.17.1+1.21.1 · 6 days ago · 164.01 KB

Release download
Fabric 1.21 1.21.1
inventory_2
Variants-CIT 4.11.1+1.21.9

4.11.1+1.21.9 · 3 weeks ago · 272.50 KB

Fabric 1.21.9 1.21.10 1.21.11
inventory_2
Variants-CIT 4.11.1+1.21.6

4.11.1+1.21.6 · 3 weeks ago · 272.47 KB

Fabric 1.21.6 1.21.7 1.21.8
inventory_2
Variants-CIT 4.11.1+1.21.5

4.11.1+1.21.5 · 3 weeks ago · 272.43 KB

Fabric 1.21.5
inventory_2
Variants-CIT 3.16.1+1.21.4

3.16.1+1.21.4 · 3 weeks ago · 284.12 KB

Fabric 1.21.4

About

Variants-CIT

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

This mod isn't as flexible as optifine, but 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 at once.

Ready-to-use forks of resource packs for this mod:

Resource Pack Format

This is an overview, please see 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 a condition for every CIT, you define a single rule that governs all CITs in a collection, (so-called modules). This modules defines what item is affected, how to figure out its variants, and where their models are located.

For example, here's a simple module that would change the texture of enchanted books :

{
	"type": "stored_enchantment", // The behaviour of the module
	"items": "minecraft:enchanted_book", // The affected item type(s)
	"modelPrefix": "item/book_cit/", // The folder containing the possible models/textures.
	"modelParent": "item/generated", // Automatically generate models from texture (if models are absent)
	"parameters": { // Extra options specific to the module type
		"levelSeparator": "_lvl_" // Include the 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/texture/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.

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

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

At a higher level, you can create variants by combining multiple pieces of data from multiple components:

{
	"type": "component_format",
	"items": "minecraft:diamond_sword",
	"modelPrefix": "item/trimmed_diamond_sword/",
	"parameters":{
		"format": "${pattern}_${material}", // How to combine various pieces of data into a variant ID
		"variables": { // Where to find those pieces of data.
			"pattern": {
				"componentType": "trim",
				"nbtPath": ".pattern"
			},
			"material": {
				"componentType": "trim",
				"nbtPath": ".material",
				"transform": "discard_namespace"
			}
		}
	}
}
open_in_new View on Modrinth
Compatibility
Client: Required Server: Unsupported
gavel EUPL-1.2

Conversation

What are your thoughts?

Related projects

Library
Fabric API
Fabric API

by modmuss50

Lightweight and modular API providing common hooks and intercompatibility measures utilized by mods using the Fabric toolchain.

download 128.4M
favorite 27,401
Optimization
Sodium
Sodium

by jellysquid3

The fastest and most compatible rendering optimization mod for Minecraft. Now available for both NeoForge and Fabric!

download 118.2M
favorite 32,788
Library
Cloth Config API
Cloth Config API

by shedaniel

Configuration Library for Minecraft Mods

download 94.4M
favorite 13,670
Decoration Optimization
Iris Shaders
Iris Shaders

by coderbot

A modern shader pack loader for Minecraft intended to be compatible with existing OptiFine shader packs

download 90.5M
favorite 23,773
lock Cookie consent

SkinMC uses cookies to provide functionality and features.