NBT-API

NBT-API

98.9k Downloads

Missing NBTTagLongArray

ShaneBeee opened this issue ยท 5 comments

commented

It appears there is no NBTType for Long Array.
When using NBTCompound#getType(String tag) using a Long array returns NBTTagEnd

Also missing:
NBTCompound#getLongArray()
NBTCompound#setLongArray()

Doing some digging on McWiki, this was added in MC 1.12

commented

I'm not aware that long array is used by vanilla, therefor I didn't add it when adding lists. Does the wiki say where it's used?

commented

I can't seem to find anything on McWiki, but looking thru source code I see its used in serializing chunk data and structure stuff.
Screenshot 2023-04-19 at 2 04 55 PM

commented

Thanks, definitely no rush.
I use NBT-API in a plugin of mine called SkBee, which is an addon for Skript.
A lot of the users use it for adding custom NBT values.
I really doubt anyone will use it, I just wanted to make sure all bases are covered.

commented

Hm, will look into adding it next update(probably 1.20?). Chunk and structure stuff is probably never parsed with this lib, so no one noticed that it's actually used.

commented

Started adding the type, but ran into maybe an oversight by Mojang. At least in 1.12.2 there is a NBTTagLongArray class with id 12, but the NBTTagCompound class is entirely missing getLongArray/setLongArray. So implementing it would require quite a bit more reflection logic. 1.17 does have it, so I assume it's at least in 1.16+. That would be the versions where I'll implement it for now(not like anyone cares for 1.13-1.15).