[Bug] Elytra broken textures are not displaying.
Description of Issue
Using the optifine/cit feature for custom textured items when named, broken elytras don't seem to display their assigned texture.
Steps to Reproduce
- Have custom elytra textures in a resource pack that make use of optifine cit features.
- Spawn in a broken elytra and name it to match the cit properties file.
- The named elytra doesn't use the broken texture, whereas a non-named elytra does show it is broken with the vanilla texture.
- It uses the normal icon texture, not the broken one. In other words, not detecting the elytra durability as broken to use the broken_elytra property?
blue.properties
type=elytra
items=elytra
texture=blue
nbt.display.Name=ipattern:blue elytra
blueicon.properties
type=item
items=elytra
texture.elytra=blueicon
texture.broken_elytra=bluebroke
nbt.display.Name=ipattern:blue elytra

OptiFine Version
OptiFine HD U G7 pre4
Installation Method
Standalone installer.
I had a similar issue myself, and managed to fix it: I already had the normal item icon and broken item icon have separate properties files, so the folder would have 3 properties files within it, 1 for each texture file. I'm sure there's a way to fix it without separating them, but I don't know how to do that.
First, I made sure that the broken texture's properties file loaded as priority over the others (or at least, the normal icon texture file). You can do this just by changing it's position in alphabetical order (left/top of the folder is priority i believe). Second, I made sure the item the broken texture was supposed to replace was still the elytra. There is no actual 'broken elytra': to get one in game you need a fully damaged, normal elytra. Next, in a new line after the nbt.display.Name: etc etc etc. write: damage=431 This is the damage level where the elytra's texture is replaced with the broken elytra texture normally. That way the broken texture for your custom elytra will only show up when the elytra has lost all of its' durability.

Apologies if this doesn't help!
That's a pretty smart workaround for this bug, although it would still be nice for it to be fixed one day
I have a resource pack with hundreds of elytras, so that workaround is not viable for me without being time consuming to add. I'm hoping the shared icon properties file can just be fixed so it detects damaged elytras again.
Bumping this, would like to see a fix as I cannot figure out how to get broken elytra textures to display even with the nbt workaround.
i know this is old so you probably dont care anymore lol but if it could help someone else in the future then why not share it.
i've encountered the same issue and what worked for me is just downloading a default vanilla minecraft resource pack and copying the elytra.json and broken_elytra.json files from the default resource pack folder (assets/minectaft/models/item) to my own pack (the same path) and it worked. my broken elytra texture was visible when it's durability was at 1 im playing on 1.20.1 btw. hope this helps someone <3
hi, i have same problem,
i put those json files in item folder and checked all things that could be wrong as u all said but it still didn't resolve my problem
mybe its bcs i am on 1.21
oh it was my fault i saved file on pnd not png XD
lmaoo ive made lots of stupid mistakes like this haha glad you figured it out