You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NBT is mostly complete, further amendments will be made if needed that I have not seen during development. It's been quite the hassle reverse engineering it and wiki.vg has got some things missing.
String tags and strings in general (i.e strings in compounds, lists and the tag themselves) that are empty "" require the TagType and a 0 Short, this caught me off guard and I fixed it recently as of writing.
The code looks quite messy but I have tried my best to make it separated and distinguishable. There is a function that needs further explanation. CreateCompoundTag creates a CompundTag object and traverses to it, CreateCompoundTagObject Creates the object and returns it, be careful it may catch you off-guard I am planning to rename this!
Renamed CreateCompoundTagObject to CreateCompoundTag. The previous CreateCompoundTag which is sets the currentTag in the writer is now called AddCompoundTag. I will also be making all Tag Structs have an encode method so interfaces can be used to easily do all of them at the same time and get the result at the same time, just makes the code cleaner and more maintainable. The current performance of NBT is alright but I would like it to be better, but I haven't seen much on what I could do. Tag structs having an encode method and returning a byte slice means I can estimate the size of tags and create a slice that can fit them to minimise extra allocations, which can amount to a performance improvement.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
NBT is mostly complete, further amendments will be made if needed that I have not seen during development. It's been quite the hassle reverse engineering it and wiki.vg has got some things missing.
String tags and strings in general (i.e strings in compounds, lists and the tag themselves) that are empty
""
require the TagType and a 0 Short, this caught me off guard and I fixed it recently as of writing.The code looks quite messy but I have tried my best to make it separated and distinguishable. There is a function that needs further explanation.
CreateCompoundTag
creates a CompundTag object and traverses to it,CreateCompoundTagObject
Creates the object and returns it, be careful it may catch you off-guard I am planning to rename this!Beta Was this translation helpful? Give feedback.
All reactions