#Item With Spicific Tag
1 messages · Page 1 of 1 (latest)
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()
Yup I saw this also in blocks
for item not entity
not the item entity the itemStack
Okay, what if the item is turned into an entity then placed back haha, thx for clearing that up.
I really need something like the compass after using it on lodestone
Change state of block if interaction with an item?
Either permutations or setType
I mean like save coordinations in the item
Database can do this easily
Just more complex
But how to link the data with the item
So there must be something like a id or tag to know the itzm
item*
I'm a little confused on what your wanting to achieve.
Can you go through the steps of what is happening in game
Ok
Can you explain more please
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
itemUseOn, or Item Use(raycast block in front of player), JSON.stringify location of block interacted
then to acess locations JSON.parse(item.getLore()[0]) gives you object with the x,y and z of block intercted with
Nice
Yeah follow his logic
Thanks a lot guys
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
you have to set the item back into the inventory so that the lore shows up and yes you can get the lore
So I can hide it or show it if I want
yes
That's great Thanks a lot w♥️
I'm facing a problem that when I set the lore and get it later it gives undefined
And also I'm trying to set the item back to the main hand , but the item just disappear
Can you give me an example please
item.setLore(['H'])
inv.setItem(player.selectedSlot,item)