Jump to content

How much nbt is to much nbt?


Recommended Posts

Quick question about how much nbt is to much to store on an item.


I am currently creating an item that stores sets of coordinates and allows a player to teleport to those coordinates. I would like it to be able to store as many sets of coordinates as possible but i dont know many is too many (if / when it will start to influence performance)


Each coordinate is an NBTTagCompound that consists of.

-Name (String)

-X (double)

-Y (double)

-Z (double)

-Dimension (int)

-Pitch (float)

-Yaw (float)

-WP (boolean)


And all of those compounds are stored in an NBTTagList.


So with that information can anyone tell me how many sets of coordinates i should allow the item to store?

I am the author of Draconic Evolution

Link to comment
Share on other sites

There are few sub-questions for your "performance" question.

HDD Memory: I wouldn't even care about it. ;p

Even if you would have server running for years on which there would be even 100000 of those ItemStacks, each even with 10 Tags, it's all compressed to byte sizes. Tops few MB for very big variety of NBTs in a lot of ItemStacks.


RAM Memory:

Any ItemStack loaded by MC is held in RAM. Yet - it's still few MB tops. I wouldn't really care about it.



Only thing that could be annoying. UNTIL you are only saving ints, doubles, booleans and floats it's again - safe. Having 100 players that would simultaneously request form server a chest full of custom ItemStacks with NBTs would get you 2700 ItemStacks? That's nothing if they are holding only Tags listed above. This is a quite extreme situation ofc.


Problem appears when you would store Strings in NBT. Lately I tried to store textures inside NBT using String. It was working for 16x16, quite well for 32x32, anything above would generate lags. But you know - those are HUGE values compared to simple generic type Tags.



1. You couldn't care less about saving NBT in this case (I mean, how many of those items will there be...)

2. You could say nope to most of those, why would you save pitch or yaw? Most important is x,y,z and worldUUID/name/id (UUID is safest BUT takes some space).


1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Thanks for your input! With all that in mind i think i will set the limit to 100 which should be plenty for most people.


I save pitch and yaw because i want it to place the player in the exact spot facing the same direction as when the location was recorded (similar to a mystcraft link book)


"Name" is the name of the destination that can be set by the player not the name of the player so i dont need to worry about UUID. 

I am the author of Draconic Evolution

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.