nbt.display.lore
nEONcReepER990 opened this issue · 4 comments
Hello, unfortunately i am back.
I am saying it now I am Not A Coder and i dont understant this that well, so yea.
On the image i have posted you can see 8 textures each with its own .propeties file but here is the problem: the upper 4 textures replace the lower 4 ones. I have marked the main lore/name texts that are in the .properties files on the image.
If you've read this far, congratulations and if you didn't understand basically i am trying to find an "AND gate" for .propeties that means the item need all of the rules to apply.
!!!You are completely welcone to ignor if this doesn't make sense!!!
Ye, I'm having a hard time understanding this haha 😄
If I'm getting this right, you are only asking how you would do an and
for the lore conditions.
For a cit(a .properties
file) to work, all of the condition listed in it must be met (everything passes through an and gate
).
Meaning that you can write multiple lore conditions and that cit will only apply if all of the lore lines match.
Only caveat is that each line must have a unique key(the part that comes before the =
sign).
So this will work
nbt.display.Lore.0=first line
nbt.display.Lore.1=second line
nbt.display.Lore.2=third line
But this will not
nbt.display.Lore.*=any line
nbt.display.Lore.*=any other line
nbt.display.Lore.*=any other other line
You could try using regex for this:
(! You have to integrate the ColorCodes into this as well !)
For the first three:
nbt.display.name=regex:Commission #[0-9]*
For the last one:
nbt.display.name=regex:Commission #[0-9]* NEW
For the different types:
nbt.display.lore.*=regex:.*Gemstone Powder
nbt.display.lore.*=regex:.*Mithril Powder
But since your lines shift from one item to the other it's not possible to check for the progress and for the item type.
Edit: It looks like you do this for a server... its much better to use custom model data if you have access to those items' nbt data.
But since your lines shift from one item to the other it's not possible to check for the progress and for the item type.
---> you mean lore lines shift? or the "minecraft:writable_book" because item type is the same all the time
nbt.display.Lore.0=first line
nbt.display.Lore.1=second line
nbt.display.Lore.2=third line
---> the lore lines shift so it doesent work, but i get the idea
Edit: It looks like you do this for a server... its much better to use custom model data if you have access to those items' nbt data.
---> I dont, the server is Hypixel Skyblock
To sum it up. It seems you are looking for a way to use
nbt.display.Lore.*=...
multiple times.
The problem with that is that the .properties
format does not support having the same key multiple times.
I'll add a way around that in the future but right now this is not possible with the cit format.