Published Jul 21st, 2023, 7/21/23 5:19 pm
- 5,062 views, 10 today
- 4
- 3
3
Custom model data can be used to essentially add a skin to an item by changing it's texture based on a value
You must first need a basic resource pack file and general knowledge of how computer files work in order to follow this tutorial correctly
( You can download a basic resource pack file here >> www.planetminecraft.com/texture-pack/base-resource-pack/ )
In your resource pack file, enter assets>minecraft>textures>item (If any of these folders don't exist make create as you go)
Put your custom item texture inside this folder. It can be larger than 16x16, it just won't look very Minecraft'y
If you just want to make an item look like an existing item, than you don't have to do this
Enter assets>minecraft>models>item>new and make a new file named key.json and paste this code into it:
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "item/key"
}
}
You can changeminecraft:item/generated
to
minecraft:item/handheld
to make the player hold it more like a sword or a pickaxeIn assets>minecraft>models>item (Just outside the 'new' folder), create a new file named flint.json. This will be the item we are replacing.
Paste this code into flint.json:
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecraft:item/flint"
},
"overrides": [
{ "predicate": { "custom_model_data": 1 }, "model": "item/new/key"}
]
}
Apply the resource pack to your game, and execute this command:
/give @s minecraft:flint{CustomModelData:1b}
See here to download the full pack [link pending]
This will work on blocks too (ONLY BLOCKS IN YOUR INVENTORY, WILL NOT WORK WHEN PLACED IN THE WORLD)
{
"parent": "minecraft:block/sand",
"overrides": [
{ "predicate": { "custom_model_data": 1 }, "model": "item/new/key"}
]
}
A tutorial for applying this feature in your server is coming soon!
Tags |
6012696
6
Create an account or sign in to comment.