sp614x / optifine

1.8k stars 418 forks source link

[CIT] CIT not working #7596

Closed Baby-FarkMcGeezax closed 7 months ago

Baby-FarkMcGeezax commented 9 months ago

Description of Issue

CIT seems to be broken in the latest version (1.20.4) to some odd effects:

Items renamed (and thus CIT applied) in-world in older versions remain functional (models/textures displaying), but any newly renamed items will NOT work (retain their default model/texture). Even if the item/name are exactly the same.

For example, you could have an iron sword that was renamed "bowie" in a previous version, and it'll display the texture set for it in the CIT properties file. But if you take a new iron sword, and rename it "bowie" in the current release, it will won't function.

Steps to Reproduce

  1. Use CIT in an older version and see it works
  2. Open the world in 1.20.4 and see it apparently functioning still
  3. Try to recreate it exactly

OptiFine Version

1.20.4

Log Files/Crash Reports

The log doesn't seem to give any relevant errors or warnings. It acknowledges the CIT item like normal.

F3 Debug Screenshot

2023-12-28_18 48 56

SeaOfPixels commented 9 months ago

Can confirm, affects worlds backported from 1.20.4 as well. Huge issue for my resource pack, high-key praying it gets fixed before OptiFine 1.20.4 fully releases so I don't get an absolute cavalcade of people telling me my pack is broken.

SeaOfPixels commented 9 months ago

The string nbt.display.Name=iregex:(.*INSERT TEXT HERE.*) is seemingly the only variant that works now, attempting to use the standard string nbt.display.Name=iregex:INSERT TEXT HERE does not work, and attempting to make multiple name options like for example the string nbt.display.Name=regex:INSERT TEXT HERE|.*\\(INSERT TEXT HERE\\)|\\(INSERT TEXT HERE\\).* does not work either.

ZenithRogue commented 9 months ago

This issue has to do with changes to the how text is stored by default in recent release of the game. Old: {id:"minecraft:netherite_sword",tag:{display:{Name:'{"text":"Dungeons Netherite Sword"}'}}} New: {id:"minecraft:netherite_sword",tag:{display:{Name:'"Dungeons Netherite Sword"'}}}

I'm not sure if this is anything that OptiFine should fix, as NBT parsing is generalized; There isn't any specific code to handle item names.

flashpaul commented 9 months ago

Also for me all the textures with nbt.display.Lore.0= have stopped working. :/

Baby-FarkMcGeezax commented 9 months ago

I accidentally found out that nbt.display.Name=ipattern: also seems to work

ZeonBT commented 7 months ago

I can confirm this bug... but i have around it. I summon mobs with the name and item with 100% drop rate and the items spawn

SeaOfPixels commented 7 months ago

Can confirm in OptiFine 1.20.4_HD_U_I7_pre3

sp614x commented 7 months ago

Fixed, coming in next preview.