#Export to item model

5 messages · Page 1 of 1 (latest)

pastel trout
#

I know this is probably a question that's easily answerable but how do I export a model to overwrite an item when it has specific nbt?

obtuse nymph
#

For vanilla:

#

!faq custom_model_data

royal kestrelBOT
# obtuse nymph !faq custom_model_data

Disclaimer: This only works for items (not placed blocks!) and only if you are in Java Edition 1.14 or later!

Example to give a stick 4 new models:
You'd place this file in YourResourcePack/assets/minecraft/models/item and call it stick.json.

stick.json

{
    "parent": "item/generated",
    "textures": {
        "layer0": "item/stick"
    },
    "overrides": [
        { "predicate": {"custom_model_data": 1}, "model": "item/custom_stick"},
        { "predicate": {"custom_model_data": 2}, "model": "custom/branch"},
        { "predicate": {"custom_model_data": 3}, "model": "block/stone"},
        { "predicate": {"custom_model_data": 4}, "model": "item/more_sticks"}
    ]
}```
Ingame you can give yourself one of the custom sticks by doing `/give <player> stick{CustomModelData:X}` (X being replaced by the number you want)

*PS: The model path is **always** relative to the models folder of your pack.*
*So `"item/custom_stick"` will load the model in `YourPack/assets/minecraft/models/item` called custom_stick.json.*
*For `"custom/branch"` it would be the model in `YourPack/assets/minecraft/models/custom` called branch.json and so on.*