Back to mods
Custom Model Predicates project artwork

CurseForge · Minecraft mod

Custom Model Predicates

A forge mod that allows changing models based on stack size, nbt and other factors similat to Custom Item Textures (CIT)

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Custom Model Predicates release should I use?

Updated 4 years ago
Latest stable file custommodelpredicates-1.16.4-1.2.jar
Game version 1.16.5
Loader Forge

Custom Model Predicates custommodelpredicates-1.16.4-1.2.jar targets 1.16.5 with Forge. The project page does not say whether this file belongs on the client, dedicated server, or both. No extra mods listed for this file.

Where it goes

Is Custom Model Predicates required on the client, server, or both?

The project page does not say whether this file belongs on the client, dedicated server, or both.

Client Source doesn’t say
Dedicated server Source doesn’t say
Loader for this release Forge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source does not explicitly classify this release as client-only or server-only.

What else does Custom Model Predicates custommodelpredicates-1.16.4-1.2.jar need?

custommodelpredicates-1.16.4-1.2.jar. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add Custom Model Predicates without breaking your instance.

Built for Custom Model Predicates custommodelpredicates-1.16.4-1.2.jar. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use custommodelpredicates-1.16.4-1.2.jar. It targets 1.16.5 with Forge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    The project page does not say whether this file belongs on the client, dedicated server, or both.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside custommodelpredicates-1.16.4-1.2.jar. It opens that exact file at the source.

About this project

What does Custom Model Predicates add?

Custom Model Predicates

Custom Model Predicates is a Forge mod that allows resource pack makers and mod devs to specify custom models for items based on name, nbt, stack sizes and more.

How it works

To start, this mod uses model replacement in a similar way to how resource packs work, but with a few key differences.

First, the json file must have "loader": "custommodelpredicates:custommodelpredicates" in order for it to be read by this mod

Second, every json requires a base model that's used when none of the predicates match.

Third, this mod does not use the overrides array, but instead uses a new array called "predicates".

This array is checked BEFORE the "overrides" block that's seen in vanilla jsons.

This array can hold as many predicates as required although it's recommended to keep the count low to reduce lag.

Each predicate in the array is checked every time the model is rendered and returns the first one that matches.

Order Matters!

Predicates

a predicate is composed of the type of predicate it is, the requirements for matching it, and the model to return if it matches. This list of supported predicates will be periodically updated as the mod matures

Supported predicates:

Name: the name predicate is used to match when an item has a specific name, example:

    {
      "type": "name",
      "name": "aw man",
      "model" :  {"parent" :"item/gunpowder"}
    }

Count: The count predicate is used to match whenever an item has more than, less than, or equal to a specific number.

Examples:

Greater: This predicate matches when the stack size of the target is greater than the specified number

    {
      "type": "count",
      "count": ">2",
      "model" :  {"parent" :"custommodelpredicates:item/three_gold_ingots"}
    }

Lesser: This predicate matches when the stack size of the target is less than the specified count

    {
      "type": "count",
      "count": "<3",
      "model" :  {"parent" :"custommodelpredicates:item/two_gold_ingots"}
    }

Equal: This predicate matches when the stack size of the target is equal to the specified count

    {
      "type": "count",
      "count": "2",
      "model" :  {"parent" :"custommodelpredicates:item/two_gold_ingots"}
    }

nbt: The nbt predicate is used to match whenever an item has a specific nbt tag of a specific value or range.

There are multiple types of nbt tags, the ones this mod is currently capable of matching are boolean, byte, short, int, long, float, double, and string.

All nbt types except for boolean and string support < and > range matches. All nbt types support exact matches. Use caution with floats/doubles when exact matching

In order for an nbt predicate to match, the item has to have the tag specified, and it needs to be within the range set.

Example:

This tag matches whenever the itemstack has the "test_number" tag of the type int, and that value is equal to 1.

    {
      "type": "nbt",
      "tag_name" : "test_number",
      "tag_type": "int",
      "require" : "=1",
      "model" :  {"parent" :"item/diamond"}
    }<br /><br /><br />

modid: The modid predicate is used to test whenever the specified mod is loaded.

Example:

    {
      "type": "modid",
      "modid": "examplemod",
      "model" :  {"parent" :"item/iron_ingot"}
    }

There's some basic examples included on github (wip).

FAQ:

Q: Can you port this to (insert any version below 1.16.5?)
A: No.

Q: Can this work client side only?

A: Yes, it even works on vanilla servers.

Q: Can this load CIT resource packs?
A: No, but when this mod is mature it should be able to have an equivalent for all of Optifine's predicates.

Q: Can this be used in modpacks?
A: Absolutely, no matter where.

Contact info

Need a custom mod for a reasonable fee? Just want to chat? Have a complex issue needing additional discussion? Join the Discord:


Want to help support this mod and others? donate to my Patreon in the link below

Project description from CurseForge.

Pick your setup

Custom Model Predicates by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

2 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Custom Model Predicates versions and loaders

4 of 4 releases match

Looking for an older file? The official CurseForge project page is in Resources.