Skip to content

More NBT Changes [2.9.0]

Compare
Choose a tag to compare
@ShaneBeee ShaneBeee released this 08 May 04:16
· 1257 commits to master since this release

⭐️ IMPORTANT NOTE ON NBT ⭐️:

Since it appears you guys still haven't figured out the NBT changes from many many MANY versions ago,
Please see changelog of SkBee 2.0.0 and SkBee 2.5.0 regarding NBT changes
These changes MAY break your server, so I highly recommend reading them.

⭐️ IMPORTANT NOTE ON DISPLAY ENTITIES ⭐️:

Display entities are still quite buggy in Minecraft/Spigot/Paper. If things aren't working how you'd expect, please don't report bugs, as there's really nothing I can do about it. All the syntaxes in this update are DIRECTLY related to Bukkit API, nothing special, and nothing I can fix.

THIS UPDATE:

ADDED:

  • Added camel and sniffer to temp spawn effect
  • Added the ability to add/remove numbers to/from number based nbt tags, ex:
add 1 to int tag "custom;points" of nbt of player
add 1 to int tag "foodLevel" of nbt of player
remove 10 from short tag "HurtTime" of nbt of target entity
remove 10 from int tag "Age" of nbt of last spawned entity
  • Added the ability to add strings/numbers/compounds to list based tags, ex:
add "blah" to string list tag "names" of {_nbt}
add 10,12,14 to int list tag "numbers" of {_nbt}
add nbt from "{points:10}" to compound list tag "stuff" of {_nbt}
  • Added the ability to remove strings/numbers from list based tags (due to how compound lists work, compounds cannot be removed), ex:
remove "blah" from string list tag "names" of {_nbt}
remove 15, 16 and 17 from int list tag "numbers" of {_nbt}

CHANGED:

  • Changed how parsing works with %nbttype% %string% of %nbtcompound% to better error when setting to the wrong type, ex:

Code:

set string tag "test" of {_n} to 1
set int tag "test" of {_n} to "test"

Error:

[21:10:20 INFO]: Line 4: (test.sk)
[21:10:20 INFO]:     string tag "test" of {_n} can't be set to '1' because the latter is not a text
[21:10:20 INFO]:     Line: set string tag "test" of {_n} to 1
[21:10:20 INFO]:  
[21:10:20 INFO]: Line 5: (test.sk)
[21:10:20 INFO]:     int tag "test" of {_n} can't be set to "test" because the latter is not a number
[21:10:20 INFO]:     Line: set int tag "test" of {_n} to "test"

The error will be more blunt telling you that you cannot set a string tag to a number and a number tag cannot be set to a string.