CIT Resewn

CIT Resewn

17M Downloads

[1.21.1] components.minecraft\:lore not working properly or im a dumbass

Martinnicchi opened this issue ยท 6 comments

commented

The issue

This is the code im trying to make work and lore is the problem. I might be using ipattern wrong, I don't know. Tried already multiple fixes, nothing works. Using regular custom_data.id works perfectly fine.

items=minecraft:golden_hoe
texture=fungi_cutter_brown
components.minecraft\:lore=ipattern:"*Brown Mushrooms*"
components.minecraft\:custom_data.id=FUNGI_CUTTER

How to reproduce

  1. create resource pack
  2. have .properties file with components.minecraft\:lore=
  3. give yourself an item matching .properties file
  4. see the texture staying default

Logs

https://pastebin.com/Tjw6688T

Checklist

  • I checked the issues(both open and closed) and could not find a duplicate of my issue
  • I am using the latest version of CIT Resewn for my Minecraft version
  • I have disabled Broken Paths and the issue persists
  • I am running the mod using Fabric Loader
commented

lore is a list, not a single line as custom_name. U need to specify with element of this list should match, add .x replacing x with needed index starting from 0 as first, use asteric to specify that index does not matter.
It will be something like components.minecraft\:lore.*=ipattern:"*Brown Mushrooms*"

Here is optifine docs with example

Also, im not sure should be there quotes or not, i would remove them

commented

I tried both of those, no effect.

commented

Please show exactly what you tried and the logs that came out of it. HiWord is right here in saying that lore is a list of texts rather than a single text like custom name.

commented

It works, thank you very much! I didn't think that space would matter.

commented

Here's a short video, hope it helps, if you need anything more ask away.

The space. U made it depend on space at the begining by adding the space char at the begining of pattern. U basically set it to match "space, then any text, then 'arachno', and then any text", which is not the case here as space is missing. Remove space after : and it should work. Also im not sure about the quotes so i'd remove them too.

Also i see u tried it with 'blazing' lore at first line using index 1, it wont work cause indexes start at 0, 0 is first and 1 is second and so on.

That's about lore, i dont know anything about custom data so make sure to check it is correct.

commented

Here's a short video, hope it helps, if you need anything more ask away.

2024-12-25.14-29-50.1.mp4

Also here's mod list im using:
Zrzut ekranu 2024-12-25 143827
Zrzut ekranu 2024-12-25 143734
Zrzut ekranu 2024-12-25 143806