NBT
DeveloperMxrlin opened this issue ยท 1 comments
So I found classes like NbtFactory, NbtWrapper, NbtBase etc. in ProtocolLib and want to get NBT data from my item. I would guess with NbtFactory#of(String name, byte value) which returns a NbtBase, and then I dont know. At all I dont know how to use that NbtAPI integrated in ProtocolLib.
ProtocolLib just wraps Minecraft, so you need to understand how nbt works in mc before you can work with the ProtocolLib one. https://minecraft.fandom.com/de/wiki/NBT might be a good entry point for that.
Anyway, from your question I'm guessing you want to use NbtFactory.ofCompound(name)
or NbtFactory.ofWrapper(NbtType.TAG_COMPOUND, name)
(first one is preferred)