Minecraft 1.10: Damaged Item Variants Not Working!

Minecraft 1.10: Damaged Item Variants Not Working! - Leather Samples on the Table for Selection

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?enter image description here



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 in assets/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 at assets/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

{
"parent": "item/handheld",
"textures": {
    "layer0": "items/wood_sword"
},
"overrides":[
{"predicate":{"damaged":1,"damage":0.25},
"model":"item/custom"}]
}

\assets\minecraft\models\item\custom.json

{
"parent":"item/handheld",
"textures":{"layer0":"items/gold_sword"}
}

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.




Pictures about "Minecraft 1.10: Damaged Item Variants Not Working!"

Minecraft 1.10: Damaged Item Variants Not Working! - Woman cutting off adhesive tape from box with parcel
Minecraft 1.10: Damaged Item Variants Not Working! - Screws and repair tools in box near hammer
Minecraft 1.10: Damaged Item Variants Not Working! - Crop craftswoman in casual wear sitting at old fashioned sewing machine and stitching pieces of fabric while working in workshop





Modelling Minecraft - E5: Damaged Item Variants




More answers regarding minecraft 1.10: Damaged Item Variants Not Working!

Answer 2

The problem you have, is that you are using a mac. I also using a mac, discovered the same problem . There are workarounds like the one you said, using an online text editor, but Text Edit changes the format.

Hope this helps!

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: cottonbro, Liza Summer, Anete Lusina, Andrea Piacquadio