#Item With Spicific Tag

1 messages · Page 1 of 1 (latest)

wintry widget
#

Is there a way to give an item spicific tag like the compass when you click on a lodestone and how to get / add this tag using script please ?

split sky
#

We have .getTags() method to get the tag of item, we also have .hasTag() which test if the item has the tag you defined. But we cannot set that tag, there's no .setTag()

wintry widget
#

Yup I saw this also in blocks

tropic anchor
#

for item not entity

limpid junco
#

Ooof

#

Isn't item an entity

tropic anchor
limpid junco
wintry widget
#

I really need something like the compass after using it on lodestone

limpid junco
#

Either permutations or setType

wintry widget
#

I mean like save coordinations in the item

limpid junco
#

Just more complex

wintry widget
#

But how to link the data with the item

#

So there must be something like a id or tag to know the itzm

#

item*

limpid junco
#

Can you go through the steps of what is happening in game

wintry widget
#

Ok

tropic anchor
#

setLore

wintry widget
#

Can you explain more please

limpid junco
#

Oh yeah, if that's the case lore is very good

#

The lore of the item you save to it...so it stays with the item

tropic anchor
#

then to acess locations JSON.parse(item.getLore()[0]) gives you object with the x,y and z of block intercted with

limpid junco
#

I use the lore method on a custom generators system I have

#

When pickup block

limpid junco
#

Yeah follow his logic

wintry widget
#

Thanks a lot guys

wintry widget
#

I tried the setLore and getLore and they are what I wanted , but when I setLore to an item the lore of it doesn't show in the game , but I can get it from script @tropic anchor

tropic anchor
wintry widget
#

So I can hide it or show it if I want

tropic anchor
wintry widget
#

That's great Thanks a lot w♥️

wintry widget
#

I'm facing a problem that when I set the lore and get it later it gives undefined

wintry widget
#

Can you give me an example please

tropic anchor