Fabric mod that allows resource pack creators to overwrite the models for held items just like the spyglass and trident
Pommel is a Fabric mod that lets resourcepacks replace the models for the held version of items—just like the spyglass and the trident—letting you customize what your item looks in your hand. Want to make a 3d model of the mace in your hand, a fiery greatsword, or an ancient magical staff while still retaining the original item? With Pommel, all that can be achieved!
Works for modded items as well!
If you create a resource pack with Pommel, feel free to share your work to me! I'd love to see what you can make!
Adds the following Item Predicates:
pommel:is_held — when item is held in hand in third or first personpommel:first_third_person — item in first person vs third personpommel:is_offhand — item is in the user's offhand slotpommel:is_fixed — when item is in an item framepommel:is_head — when item is worn on head in helmet slotpommel:is_ground — when item is dropped onto the groundpommel:is_thrown — throwable items when thrown (egg, snowball, enderpearl, etc.)pommel:is_used — when item is being used (i.e. holding the use/RMB key); syncs with multiplayer if mod is on server and players have the modpommel:item_use — duration use of an item being used/consumed, like eating foodpommel:is_submerged — item is submerged in minecraft:water (doesn't work with other liquids)pommel:is_enchanted — if item is enchantedpommel:is_misc_entity_holding — items held by Villagers, Witches, Pandas, and Foxes.For example, by modifying the model, iron_pickaxe.json, you can tell the mod what model should be displayed when held with pommel:is_held.
The held model provided as well as the textures for it can be wherever as long as it's specified by the item model json file.
{
"parent": "item/handheld",
"textures": {
"layer0": "minecraft:item/2d_model_texture"
},
"overrides": [
{ "predicate": { "pommel:is_held": 1.0 }, "model": "minecraft:item/my_held_item" },
{ "predicate": { "pommel:is_fixed": 1.0 }, "model": "minecraft:item/my_framed_item" },
{ "predicate": { "pommel:is_head": 1.0 }, "model": "minecraft:item/my_worn_item" },
{ "predicate": { "pommel:is_ground": 1.0 }, "model": "minecraft:item/my_ground_item" },
]
}
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecraft:item/apple"
},
"overrides": [
{ "predicate": { "pommel:is_held": 1 }, "model": "minecraft:item/held_items/apple_3d" },
{ "predicate": { "pommel:item_use": 0.25 }, "model": "minecraft:item/apple_eat_0" },
{ "predicate": { "pommel:is_held": 1, "pommel:item_use": 0.25 }, "model": "minecraft:item/held_items/apple_eat_0_3d" },
{ "predicate": { "pommel:item_use": 0.50 }, "model": "minecraft:item/apple_eat_1" },
{ "predicate": { "pommel:is_held": 1, "pommel:item_use": 0.50 }, "model": "minecraft:item/apple_eat_1_3d" },
{ "predicate": { "pommel:item_use": 0.75 }, "model": "minecraft:item/apple_eat_2" },
{ "predicate": { "pommel:is_held": 1, "pommel:item_use": 0.75 }, "model": "minecraft:item/apple_eat_2_3d" }
]
}
In this example, the apple item will change from apple_eat_0 to apple_eat_2 as you eat it. The apple item will also change to a 3d version of this when it's being held in your hand, as well as having unique models for the hand when being eaten.
You may also specify file directories for held models for organizing, as well as changing the parent model to something else.
Replaces the carved pumpkin on head with an emerald. Just like a Sim. Sword on back with the use of Arsenal (1.20.1) and pommel:is_fixed predicate.
pommel:is_held for the custom_model_data models as well.{
"parent": "item/handheld",
"textures": {
"layer0": "item/base_item"
},
"overrides": [
{ "predicate": { "pommel:is_held": 1.0 }, "model": "minecraft:item/base_item_held" },
{ "predicate": { "custom_model_data": 1 }, "model": "minecraft:item/custom_item" },
{ "predicate": { "custom_model_data": 1, "pommel:is_held": 1.0 }, "model": "minecraft:item/custom_item_held" }
]
}
eating and eat (no mod id in front) so you can combine that with the Pommel predicates. The code will be just like the custom_model_data example above with Eating Animation's predicates. There is also a video guide on Eating Animation (also linked on the mod's page) that will show you how to set it up, too! Please check out the mod!pommel:item_use exactly the same with the identical effect without the use of Eating Animation mod. I do not want to "replace" Eating Animation. Rather, the item_use predicate was made as Eating Animation mod has some compatability issues with CIT, so this can be used as an alternative. Item models may not change/render the correct CIT model with Eating Animation, whereas Pommel does not have such issue.minecraft in front, it would be <mod_id>.
Conversation