NBT Key Model
The NBT Key Model is a model loader from Mantle that allows an item to swap its texture based on the value of a specific NBT key. Unlike the vanilla override, this maps named values to textures instead of requiring numeric indices.
NBT Key
The NBT key model maps textures to values for a specific NBT string key. It is notably used by Tinkers’ Consturct for the creative slot item, which doubles as the way modifier slot icons are loaded. It has the following format:
mantle:nbt_key
.
Always <key>
under the NBT key referenced bynbt_key
, this texture will be used.
If the item stack contains string
Mapping from texture name to resource location texture. This behaves in the same was as standard vanilla textures, but is highlighted here as the texture key mapping is different.
- Key in item stack NBT that will determine the texture used. Key will be read as a string and map to a texture in the textures array.
- Location within the Mantle extra textures map for mods to register additional textures for this model without modifying this JSON. If unset, this system is unused for this model.
NBT Key Model JSON.
Mods can register additional textures to this model using NBTKeyModel#registerExtraTexture(ResourceLocation key, String textureName, ResourceLocation texture)
.