Solved PersistentDataContainer vs. NBTTags

Discussion in 'Spigot Plugin Development' started by XxFroggyKnightxX, Jan 19, 2020.

  1. The title says it all. I was wondering which one would be better, if not more efficient? All I am doing is storing strings in NBT tags currently and was wondering if the new DataContainer in 1.13+ was worth checking out?

    EDIT: to add onto this, I know that NBT tags can be used to modify textures on items, can DataContainers also do this?

    #1 XxFroggyKnightxX, Jan 19, 2020
    Last edited: Jan 19, 2020
  2. PDC is an NBT tag. Don’t use NMS for what the API can achieve easily.
    No. PDC is sandboxed from the rest of the NBT data. If you need to modify the actual item properties accessible only through NBT, you cannot use PDC.
    • Agree Agree x 1
  3. Thank you.