1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Addon jNBT 0.3.2

NBT for entities, items and blocks (tile-entities)

  1. jaylawl
    Supported Minecraft Versions:
    • 1.12
    jNBT

    jNBT allows you to read and modify the NBT data of all entities, items and tile-entities.
    This is the product of hours of trying to figure out how to get this stuff to work correctly and reading through example code. Yet, it doesn't offer as much depth as SkStuff does - however i do intend to upgrade this.

    This add-on is purely dedicated to providing NBT usages. There won't be any non-NBT related functionality added to it.


    Installation
    • Requires:
      • Spigot 1.12.*
    1. Put the jar in the plugins-folder
    2. Restart the server (observe the console for errors)
    Links
    Incompatible with
    • SkStuff
      You can make it compatible with SkStuff by specifying "item-nbt", "block-nbt" & "entity-nbt" as opposed to using plain "nbt"
      Definitly gonna have issues if you run both
    Contents
    Entity NBT

    Code (Skript):
    1. %entity%'s [entity-]nbt
    2. [entity-]nbt of %entity%
    Methods:
    • get
    • add
    Examples
    Code (Skript):
    1. add "{NoAI:true}" to last spawned entity's nbt
    2. add "{Silent:1b}" to player's targeted entity's nbt
    3. add "{Something:something}" to entity-nbt of event-entity
    4. broadcast "%last spawned entity's nbt%"
    Item NBT
    Code (Skript):
    1. %item%'s [item-]nbt
    2. [item-]nbt of %item%
    Methods:
    • get
    • add
    • remove (work in progress)
    • set
    • delete
    • reset
    Examples
    Code (Skript):
    1. send "%{_player}'s tool's item-nbt%" to all players
    2. broadcast "%nbt of event-player's helmet%"
    3. add "{SomeTag:1234}" to player's tool's item-nbt
    4. reset event-player's helmet's nbt
    5. set nbt of command sender's chestplate to "{Yes:false,No:true}"
    6.  
    Block NBT (Tile entities)
    Code (Skript):
    1. %block%'s [block-]nbt
    2. [block-]nbt of %block%
    Methods:

    • add
    • get
    • set (kinda useless)
    Examples
    Code (Skript):
    1. add "{RequiredPlayerRange:0s}" to targeted block's nbt
    2. add "{SpawnData:{id:""minecraft:wither""}}" to nbt of clicked block
    3. broadcast "%event-block's nbt%"
    Joined NBT
    Code (Skript):
    1. joined nbt[( |-)string] from %string% and %string%
    Joins two different NBTs together. The latter value will overwrite conflicting values between the two.

    Examples
    Code (Skript):
    1. set {_ex} to joined nbt from "{Test:false,Whatever:123}" and "{Something:something,Test:true}"
    2. # {_ex} = "{Test:true,Whatever:123,Something:something}"
    Tag %string% of NBT
    Code (Skript):
    1. tag %string% of %string%
    Returns the value of the specified tag of the specified NBT

    Examples
    Code (Skript):
    1.  
    2. set {_tag} to tag "Invulnerable" of targeted entity's nbt
    3.  

    To do
    • Support MC 1.13
      • This might take some time
      • If you want compability for 1.11 or earlier, use SkStuff
      • There are no plans to create backwards compability
    • Add more in-depth NBT editing capabilities
    • Find a way to add NBT to items without having to create a new one completed!
    • Make it compatible with SkStuff maybe (it kinda is already)
    • Drink lots of coffee
    Good stuff?
    If you like this resource, please consider buying me a coffee:
    PayPal: https://www.paypal.me/langejulian
    joshwenke, Tilomi, Goetheus and 2 others like this.

Recent Updates

  1. 0.3.2
  2. 0.3.1
  3. 0.3

Recent Reviews

  1. inxane
    inxane
    5/5,
    Version: 0.3.2
    One of the most useful addons yet. Although the examples and the usage is a bit confusing, once you figure it out it becomes really easy. I made numerous skripts using your addon, and can't thank you enough for it!

    set nbt of this comment to "{Awesome:true}"
  2. IncognitoStaff
    IncognitoStaff
    5/5,
    Version: 0.3.2
    Love it! This has helped me a lot. I have used it for custom nbt and a lot more then it should be able too lol... Is there any way to do an if statement to check if an items contains x nbt?
  3. Nouma zer
    Nouma zer
    5/5,
    Version: 0.3.2
    This is perfect. But, I just want to know something, can we add custom nbt tag ?
  4. haxxorzd00d
    haxxorzd00d
    5/5,
    Version: 0.3.2
    I'm working on an NBT-heavy project, and with the recent versions of Skript (dev34 onwards I think?) not playing nice with SKStuff, I thought I was out of luck.

    You've saved me from a world of headaches, thanks a bunch! NBT is such a useful feature, I wish it was part of vanilla Skript...
  5. lucky777_
    lucky777_
    5/5,
    Version: 0.dev1
    Perfect script for not only using NBT but also understanding how to use skript-mirror. Very thanks!
    1. jaylawl
      Author's Response
      Glad you find so many uses in this! If you're looking for examples of skript-mirror usages, also check out my "Expressions+" release , there is tons more in there (although it could be done better) :)
  6. Goetheus
    Goetheus
    5/5,
    Version: 0.dev1
    Currently very promising!
    I hope some new syntaxes arrives in future, as such as get a specific Tag, or sub-Tag! And maybe add tag to an existing item :)
    Good luck and keep going! <3
    1. jaylawl
      Author's Response
      I'm glad you find it useful, thank you. I'm planning on adding all of your wishes and to even make it a .jar add-on instead of "just" a skript-mirror thing.
  7. Nicofisi
    Nicofisi
    5/5,
    Version: 0.dev1
    Great resource, thanks! Good to have something working in many Minecraft versions