forum Forumsplay_arrow Minecraft fiber_manual_record ResourcePacks

11

New 1.14 custom item models tutorial + example pack

11 emeralds2 replies2,486 views
created 10/27/2018 8:12 am by Geegaz
last reply 01/02/2019 2:06 pm
Hello, I'm Geegaz !

As you may know, the first snapshots of the 1.14 introduced a new format for the JSON item models : "custom_model_data". It's also a new NBT tag you can use on an item with the format {CustomModelData:<data here>}.
Here's a guide/tutorial on how to use it.


This tutorial is not meant for basic ressource pack creation as it touches JSON format.


NBT tag :

The Custom Model Data is a NBT tag that can be added to an item. We will use the iron_ingot as an example.
It's very simple to use as it is not different from any other NBT tag.

Note :
- The data doesn't take commas, if you add them the command won't give an error but will not work.

/give @s minecraft:iron_ingot{CustomModelData:12345678}

JSON format :

To the command above to work, the item needs its JSON format to be defined.
The code below shows how it works.
We use "overrides":{"predicate":{}} to define in which case we'll override the item's model with our custom model or, in this case, the gold_ingot's model.
Here, we wil override it if the item has a CustomModelData of 12345678.

Notes :
- The data is composed of exactly 8 digits
- The data shouldn't start with 0, or it will give an "error" model
- Doing this only changes the item model. It won't work for blocks models but can change the block's item model (block in the inventory)

{
"parent": "item/generated",
"textures": {
"layer0": "item/iron_ingot"
},

"overrides": [
{"predicate": {"custom_model_data":12345678}, "model": "item/gold_ingot"}
]
}


General notes :
- Here I only changed the iron_ingot to a gold_ingot. But you can also use this format for custom models.
- A tool with durability can be changed, and the damage of the tool will not affect its custom model. It will allow adventure/rpg maps with weapon durability.
- Packs are not compatible ! A tool modified by multiple packs, even with different datas, will only use the first one in the order of the packs applied (the one on top of your active packs in the "ressourcepacks" window)

Hope this tutorial helped you, seeya !

Example pack download :
- Mediafire -

This pack changes the iron ingot and the carved pumpkin
with the CustomModelData:12345678
Posted by avatar
Geegaz
Level 25 : Expert Engineer
20

2 replies

2
01/02/2019 2:06 pm
Level 26 : Expert Robot
Nitrox Nova
avatar
Just stumbled across this after reading the wiki documentation, the download is greatly appreciated!
2
10/31/2018 8:47 am
Level 46 : Master Batman
Knux
avatar
i'm really surprised that hardly anyone has addressed this impactful moment for minecraft creators

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome