#nbt tags

1 messages · Page 1 of 1 (latest)

sudden sorrel
#

i cant figure it out can someone write me a small example?
#1 command to give item with lets say nbt tag (or tag idk) lifesteal
#2 on death it checks if the attacks tool has that nbt tag
have tried for a long time but nothing works

crisp plover
#

See the skbee wiki for NBT stuff

sudden sorrel
#

please

#

can you write an example

crisp plover
#

what dont you understand?

sudden sorrel
#

everything

#

t odo with nbt

#

or tags

#

i dont even know what to search 😭

crisp plover
sudden sorrel
#

and i lit cant find it and am dumb

crisp plover
#

are you on the skbee wiki?

sudden sorrel
#

think so

#

pls just send example pls

crisp plover
sudden sorrel
#

:/

crisp plover
#

theres literally a dozen pages on NBT...

sudden sorrel
#

see thats the problem..

crisp plover
#

start with the intro, the NBT compounds and tags

sudden sorrel
#

i will never get an example will i

stark grotto
#

They are literally multiple examples on the doc…

warped bane
#

maybe if you said what specifically you are struggling with

#

giving you generic examples is a bit pointless considering how broad of a topic nbt is

crisp plover
#

Theres like a dozen examples there

restive robin
sudden sorrel
restive robin
#

so

sudden sorrel
#

am palying monopoly sec

restive robin
#

you can give some tools with NBT to player like this:

sudden sorrel
#

i won 👍

restive robin
#

set {_item} to stone
set int tag "ThisIsCustomNBT" of custom nbt of {_item} to 5
give {_item} to player

sudden sorrel
#

how to check for the nbt

#

if int tag "ThisIsCustomNBT" of custom nbt of {_item} is 5:

restive robin
#

set {_item} to tool of player
if int tag "ThisIsCustomNBT" of custom nbt of {_item} is 5:
send message "yes it is :)" to player

sudden sorrel
#

yay ty so much

restive robin
#

if you want to that NBT store false/true, use "boolean": set boolean tag "ThisIsCustomNBT" of custom nbt of {_item} to true

#

...

#

you can use int, boolean, string, byte, long......

#

for text use string