Skip to content

Big NBT Update [2.0.0]

Compare
Choose a tag to compare
@ShaneBeee ShaneBeee released this
· 60 commits to master since this release

This update brings some big changes to how NBT works in SkBee.
The version has been bumped up to 2.0.0 to help cut confusion (some users found the SkBee versions too close to MC versions, and found that confusing)

Wiki:

Check out the updated wiki for NBT to see how all this new stuff works.

Internal Changes:

  • A shaded library has been removed and now the server will load the library at runtime. This cuts the size of SkBee down quite a bit
  • Fixed some serializing/deserializing issues with NBT compounds in variables
  • Fixed a whole bunch of errors with NBT

NBT Changes:

String related NBT removal

Removed string related NBT (ex: add "{blah:1}" to nbt of player)
You will now have to use NBT compounds. For ex:

set {_n} to nbt compound from "{blah:1}"
add {_n} to nbt compound of player

If you previously used nbt strings like so:

set {_i} to diamond sword with nbt "{someNBT:1}"

You will now require NBT compounds, like so:

set {_n} to nbt compound from "{someNBT:1}"
set {_i} to diamond sword with nbt {_n}
# OR
set {_i} to diamond sword with nbt compound from "{someNBT:1}"

Update Item NBT

Added a new NBT item compound which will automatically apply changes.
The original nbt compound of an item would return a copy of the nbt of the item.
That meant any changes to it, would not be applied to the item, and you would have to retrieve the item from the NBT.

Because this is going to be insanely confusing for lots of people, let me break this down for you:
nbt compound of player's tool <-- this will return the FULL compound (including id, Count and tag)
example of what it returns:

 {Count:1b,id:"minecraft:diamond_sword",tag:{Damage:0,Enchantments:[{id:"minecraft:unbreaking",lvl:1s}]}}

Any changes made to this compound are NOT applied directly to the item itself.

nbt item compound of player's tool <-- this will return the "tag" portion of the NBT of an item.
example of what it returns:

{Damage:0,Enchantments:[{id:"minecraft:unbreaking",lvl:1s}]}

Any changes to this compound will be automatically applied to the item. There is no need to retrieve the item from the NBT

set {_n} to nbt item compound of player's tool
set tag "points" of {_n} to 1