sp614x / optifine

1.81k stars 416 forks source link

[CIT][1.18.x] Armor with NBT-based rule is not applied to armor when worn by a mob #6471

Open eccentricdevotion opened 2 years ago

eccentricdevotion commented 2 years ago

Description of Issue

I have been using Optifine for a number of years to retexture armor for my TARDISWeepingAngels Spigot server plugin I equip zombies and skeletons with armor with a custom display name, then use Optifine's CIT to use a new texture. The CIT property files all look similar to:

type=armor
items=minecraft:iron_chestplate
texture.iron_layer_1=cyberman1.png
nbt.display.Name=Cyberman Chest

If I comment out the NBT rule the custom armor textures work, but of course are applied to all iron armor.

The image below shows issues with NBT rule enabled - the helmet and arms are vanilla custom item models cyber_armour_with_nbt_rule This image shows the result of commenting out NBT rule and reloading resource pack cyber_armour_no_nbt_rule

Steps to Reproduce

  1. Install Spigot/Paper server
  2. Install TARDISWeepingAngels plugin
  3. Install TARDISWeepingAngels Resource Pack in Minecraft client - RP on GitHub
  4. Spawn in a Doctor Who monster /twa spawn CYBERMAN

OptiFine Version

OptiFine_1.18.1_HD_U_H4

Installation Method

Standalone installer

Other Installed Mods

No other mods

F3 Debug Screenshot

2021-12-13_16 51 43

Prior Testing

eccentricdevotion commented 2 years ago

~Seems to be resolved by changing:~ nbt.display.Name=Cyberman Chest to nbt.display.Name=ipattern:*cyberman*

eccentricdevotion commented 2 years ago

So the issue seems to be when a mob is wearing the armour - the NBT rule is applied correctly when a player wears the armour, but not when, for example, a zombie does. armour_comparison

eccentricdevotion commented 2 years ago

Seems to be related to operating system / chipset...

Working OK on WIndows 10 NOT working on macOS with M1 chip / graphics processor

eccentricdevotion commented 2 years ago

Also related (working on Win10, not on macOS) the following CTM rule:

method=fixed
matchBlocks=minecraft:iron_door:half=upper
tiles=tardis_door_upper_inside.png
biomes=minecraft:the_void
eccentricdevotion commented 2 years ago

Happy to do testing on an M1 Mac :)