How to use custom NBT

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

_PAPER_PLANE_

Member
Jan 21, 2022
41
0
6
I read the skbee NBT wiki from here, but I'm not quite sure how to use custom NBT. It mentions, "it will need to be within the "tag" tag." Does this mean I must use "tag" as the starting point?
Code:
set slot 37 of {_slotS2} to paper named "paper" with lore "paper" with nbt compound of tag 1 #←here
I'm not very familiar with how to use, it displays Can't understand.
 
I read the skbee NBT wiki from here, but I'm not quite sure how to use custom NBT. It mentions, "it will need to be within the "tag" tag." Does this mean I must use "tag" as the starting point?
Code:
set slot 37 of {_slotS2} to paper named "paper" with lore "paper" with nbt compound of tag 1 #←here
I'm not very familiar with how to use, it displays Can't understand.
The best way to modify NBT (In my opinion) is to use SkBee. You can then set up a NBT component and modify it as needed. I do think you will also have to specify whether your tag is Vanilla or custom like in my example below.

Example:
Code:
command testnbt:
   trigger:
      set {_i} to apple named "&cTest Apple" # Sets the item to a separate variable
      set {_nbt} to nbt compound of {_i} # Sets up a NBT new component
      set tag "tag;custom;type" of {_nbt} to "Apple" # Changes the NBT component to what you want
 
How do I use it in a GUI? Do I need to configure it one by one? It doesn't seem like that's the case.