Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move "Maybe String" to a map in CompoundTag #4

Closed
ghost opened this issue Dec 10, 2012 · 2 comments
Closed

move "Maybe String" to a map in CompoundTag #4

ghost opened this issue Dec 10, 2012 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 10, 2012

If you read the specification carefully, there is only one place where named tags can exist: inside compound tags. There are two tags which can contain other nodes, i.e. lists and compounds, and lists only contains unnamed tags. The root of any NBT file is also unnamed. Furthermore, within a compound tag, names must be unique.

So I propose the removal the Maybe String field in every node, and put a Data.Map.Map String NBT in CompoundTag instead of a [NBT]. This adds another dependency for this package (containers), but it's a commonly used package, so that should be fine.

@ghost
Copy link
Author

ghost commented Dec 10, 2012

I just noticed that the root of an NBT is also always named, which complicates matters.

@ghost
Copy link
Author

ghost commented Mar 13, 2013

Fixed by merging #5.

@ghost ghost closed this as completed Mar 13, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants