Trying to design a clothes system where players can buy clothes to their customisation (there are about 30 colours so I want to automate this as much as possible).
I don't know if using NBT data would work for this, because I'm connecting another plugin to this system where I have to run the command /clothes wear <player> <clothestype>/<clothesitem>_<clothescolour>, so I need a lot of different variables.
Any ideas?
#Adding variables to an item
1 messages · Page 1 of 1 (latest)
I could theoretically get the data from the item name/lore, but then it's going to look ugly for the player as instead of having an item called "Sky Blue Hoodie" it's going to be called "sky_blue hoodie" which obviously looks less professional.
can i add nbt tags aside from {thinghere: 1b} because i want to be able to make it more like {thinghere: "texthere"}
Yes you can do anything with nbt
so i can put anything there and it doesn't have to say "1b"?
NBT is fully custom, it can be anything for the tag itself and for the value
set {_clothesnbt} to nbt compound from "{custom: {clothestype: %{_clothes_type}%, clothesstyle: %{_clothes_style}%, clothescolour: %{_clothes_colour}%}}"
Would this work?
Remove the random spaces
You also don't need the tag custom, not sure if you just happen to want that or if you saw the wiki and misunderstood
oh idk what custom actually does
i've just seen it used before
wdym by the random spaces? the spaces after the commas and colons?
custom is a tag made by skbee specifically so that every single block that doesn't normally hold nbt, can hold nbt
Every space
i'm giving players leather horse armour, so do i need to add that? (pretty sure the colour of the horse armour counts as an nbt tag but i'm not entirely sure)
So, like this? set {_clothesnbt} to nbt compound from "{custom:{clothes_type:%{_clothes_type}%,clothes_item:%{_clothes_style}%,clothes_colour:%{_clothes_colour}%}"
"{Clothes:{Type:%{_clothes_type}%,Style:%{_clothes_style}%,Colour:%{_clothes_colour}%}"
I'd do that
And then you can use tag "Clothes;Type" of x
Clothes;Style
And so on
oooooh