After watching a YouTube video on how to make a resource pack where the texture of an item is different depending on its damage, I decided to try to try and do it myself. I copied the code, got an image, and made the code for both the image file and the wood sword, which is the item that will have a different texture when damaged. Unfortunately, when I load the resource pack, the item has a "unknown" texture (the black and purple pattern of doom). I'm positive I typed the code right, what did I do wrong?
Minecraft 1.10: Damaged Item Variants Not Working!
minecraft-java-editionminecraft-resource-packs
Related Topic
- Minecraft block durability
- Minecraft Java Edition – How to Assign Items a Texture Based on Their Name
- Minecraft Java Edition – How to Use Item Texture Variants with Commands and Resource Packs
- Minecraft Java Edition – How to Add Bottom Texture to Pumpkins
- Minecraft Optifine – Custom Item Models with Optifine in Minecraft 1.8.9
Best Answer
I typed in the exact same things from your screenshot and ran it (i used a golden sword instead of npcArtifact.png, and i called the JSON
custom.json
instead of npcArtifact.json. Other than that, it's the exact same thing, and it works just fine.Have you made sure to include
npcArtifact.png
inassets/minecraft/textures/items
? That's where it belongs. Also make sure it's a png, not a renamed gif or jpg. you can make sure by opening it in gimp and exporting it with the appropriate file extension.Also, your
npcArtifact.json
should be located atassets/minecraft/models/item
. double-check you didn't put it into the textures folder.Lastly, even though this sounds rediculous, but it happened to me a couple of times (being a resourcepack maker myself): make sure to put the files into the same resourcepack you are loading ingame - e.g. if you load a "respack.zip", but are working with the files inside a folder of your filesystem, make sure you copy them over into respack.zip before starting up minecraft!
hope that helps.
here's what my testfiles look like:
\assets\minecraft\models\item\wooden_sword.json
\assets\minecraft\models\item\custom.json
and the texture for the gold_sword is obviously located at \assets\minecraft\textures\items\gold_sword.png which is where your texture should go.