Community listing page, reviews here may not be monitored by the author.
Custom Model Predicates
No reviews yet
A forge mod that allows changing models based on stack size, nbt and other factors similat to Custom Item Textures (CIT)
Forge is a popular mod loader for versions 1.1+ of Minecraft.
Community voices
Reviews
Filters
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
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
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources