Skip to content

InexactCIT

Adds CIT-style regular-expression matching to the vanilla conditional models system.

Fabric
Loaders
Fabric
Downloads on Modrinth
373
Followers on Modrinth
1
versions
5
Updated
April 15, 2026Apr 15
Published
in 2025

At a glance

Runs on Fabric
For Minecraft 1.21.8–1.21.11
Client only — no need to install it on the server
Latest version — 1.0.0 from April 15, 2026
License BSD-3-Clause — free
Where it's needed
In gamerequiredOn servernot needed

Install in the game only; not needed on the server

Game versions1.21.8–1.21.11

Restoring pattern-based conditional item models.

Purpose

The Custom Item Textures (CIT) mod, originally part of McPatcher and then Optifine, allowed the replacement of item textures (and models) whose metadata matched inexact patterns. We now have near-equivalent item-texture replacement in standard Minecraft with conditional client item types, though inexact matching is no longer possible. This mod adds CIT replacement with regular expressions to the new standard conditional item definition system.

Compatibility and Dependencies

  • Minecraft: 1.21.8
  • Loader: Fabric 0.136.1

Fabric API not required.

Installation

Add the mod JAR to your Fabric mods folder.

Usage (Players)

This mod adds a feature to item model definitions which can be used by resource pack designers. It is always active when the mod is installed.

Resource Pack Integration (Pack Authors)

The JSON files found at assets/minecraft/item are item definitions. These are not necessarily the model file used to render an item (i.e. an item model), which are found at assets/minecraft/models/item.

In an item definition file, the JSON object in the "model" field determines which model file is used to render an item. Typically, a single item type is always rendered with the same model, so this object has its "type" set to minecraft:model. But different models can be used for the same item in different contexts by using "model" objects with other types, such as minecraft:condition and minecraft:select.

This mod adds the inexactcit:match item definition model type. It is similar to the built-in select type in that it contains a list of models with associated conditions, and when one condition matches, its associated model is used to render the item. Unlike Select, the Match conditions are potentially-inexact regular expressions.

Match item definition models use the same fields as Select, particularly "property", "component", "cases", and "fallback".

Labeled Field Structure

{ "model": { "type": "inexactcit:match" , "property": ... # Probably always minecraft:component , "component": ... # Name of component to target , "cases": [ { "regex": ... # Regular expression for this case , "model": { ... } # Item def'n. model used when regexp matches } , ... # Another case, as above , ... # Any number of additional cases ] , "fallback": { ... } # Item def'n. model used when no case matches } }

Required Fields

Regular expression matching is intended for text metadata, so the "property" field will be minecraft:component. Behavior when "property" is not minecraft:component is as yet untested.

The "component" field should be set to the namespaced ID for the component that will be tested by the condition, e.g. minecraft:lore, minecraft:custom_name.

The "cases" field must contain a list of JSON objects. Each object is to contain a "regex" field and corresponding "model" field. These must be a (Java-flavored) regular expression and an item definition model, respectively. When the regular expression matches against the contents of the component named in the "component" field, the corresponding model is used for that item.

The "fallback" field gives a model that is used when none of the "case" objects match, same as the standard Select.

Example

The following is an example of a Match item definition. It replaces all wooden hoes whose names include the word "Quarterstaff" with the model at pixelatedvolume:item/quarterstaff.

{ "model": { "type": "inexactcit:match" , "property": "minecraft:component" , "component": "minecraft:custom_name" , "cases": [ { "model": { "model": "pixelatedvolume:item/quarterstaff" , "type": "minecraft:model" } , "regex": ".Quarterstaff." } ] , "fallback": { "model": "minecraft:item/wooden_hoe" , "type": "minecraft:model" } } , "oversized_in_gui": true }

Text Comparison

The contents of the field being examined is serialized with toString. Text-component (JSON) features, section-code formatting, etc, is all pushed into this comparison string, so there is no way of telling what might come before or after the text that is visible in-game, or what happens between lines of multiline compontents.

Regular Expression or Model Errors

An item definition file with a malformed regular expression cannot be read so the item will appear with the default model (margenta-and-black cube). The failure (with the faulty file) is logged as an Error at pack-load time.

Multiple Target Components

To give one item multiple replacement rules that use different components (e.g. one set of rules for lore and one set for custom_name), set the fallback model to a new Match client item model that selects the second component.

Status

The ability to match properties other than minecraft:component will be added eventually. Currently, such matches are accepted without error, but they have no effect.

FAQ

How to install InexactCIT?

Install Fabric for your Minecraft version, download InexactCIT for the same version and loader, put the file into the mods folder and launch the game with the loader profile.

Which Minecraft versions does InexactCIT support?

InexactCIT has builds for Minecraft 1.21.8–1.21.11.

Is InexactCIT needed on the server?

Client only — no need to install it on the server

License and source
BSD 3-Clause "New" or "Revised" Licensefree to use and share with credit to the author
Original — Modrinth↗Files unchanged, verified with SHA-512Is this your mod? For rights holders

The site uses cookies: the necessary ones for sign-in and the theme, plus the Yandex Metrica and LiveInternet visit counters — they show us how the site is used. We have no advertising cookies. More