sp614x / optifine

1.79k stars 418 forks source link

[1.21pre6 CIT] Non-renamed based CIT not working #7728

Closed SeaOfPixels closed 1 week ago

SeaOfPixels commented 1 week ago

Description of Issue

CIT based on nbt factors that are not renames (for example unique potions/suspicious stew based on potion effect, unique axolotl/tropical fish buckets based on variant, etc) are not working in 1.21 previews.

Steps to Reproduce

  1. Open Minecraft
  2. Enable resource pack in the resource packs menu that contains non-rename based CIT
  3. View the respective items in-game

OptiFine Version

OptiFine 1.21_HD_U_J1_pre5, OptiFine 1.21_HD_U_J1_pre6

Properties examples

Unique potion bottles:

type=item
items=potion
model=item/strength_potion
nbt.Potion=minecraft:strength

Unique axolotl buckets:

type=item
matchItems=axolotl_bucket
texture=blue
nbt.Variant=4

Unique suspicous stews:

type=item
items=suspicious_stew
nbt.effects.0.id=iregex:(minecraft:blindness)

Unique tropical fish buckets:

type=item
matchItems=tropical_fish_bucket
texture=goatfish
nbt.BucketVariantTag=67110144

Unique tipped arrows items:

type=item
items=tipped_arrow
model=item/strong_tipped_arrow
nbt.Potion=minecraft:strong_swiftness

Screenshots

Unique potion bottles: 2024-09-01_16 01 45

Unique axolotl buckets: 2024-09-01_16 01 34

Unique suspicous stews: 2024-09-01_16 01 38

Unique tropical fish buckets: 2024-09-01_16 02 19

Unique tipped arrow items: 2024-09-01_16 08 42

JimStoneCraft commented 1 week ago

I've managed to get suspicious stews and name_tags working in my pack (OptiFine 1.21_HD_U_J1_pre6).

Suspicious Stew

Suspicious Stew

type=item
items=minecraft:suspicious_stew
texture=blindness
nbt.minecraft\:suspicious_stew_effects:[{id:"minecraft:blindness"}]

Tried for a few hours and cannot get anything more complex working like Potions, Books, Tipper Arrows, more testing needed.

SeaOfPixels commented 1 week ago

Closed as WAI, these strings use the new components field nbt.minecraft\:potion_contents.potion=strength, however this string will stop working in later pre releases and be replaced with components.potion_contents.potion=strength.