Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Added support for long arrays #37

Merged
merged 2 commits into from
Dec 16, 2018
Merged

Conversation

sourcehunter
Copy link
Contributor

For newer versions of Mincraft (I had to work with 1.12 and 1.13), some values are stored as Arrays of Long values, for example references to structures in chunks.

@sjmulder
Copy link
Owner

Thanks @sourcehunter! Code looks good at first sight. Hopefully I can get to giving it a try and a better look tonight, maybe adding a test too.

@sourcehunter
Copy link
Contributor Author

Thanks for the fast reply. Totally forgot that. I will provide a test case.

@sourcehunter
Copy link
Contributor Author

I found one inconsistency between nbt-js and NBTExplorer (https://github.com/jaquadro/NBTExplorer) where longs are stored in different int order. NBTExplorer stores the lower part of the long first and then the upper part, nbt-js does it the other way around. I'm not sure which one is correct, because I'm not that familiar with the file format.

@sjmulder
Copy link
Owner

Thanks! Re. the byte order, one would expect that to be specified somewhere. I'll have a look asap.

@sjmulder
Copy link
Owner

I think Substrate (the library NBTReader uses) is correct. I've opened the above linked issue to investigate.

This PR looks good, thanks for the excellent work.

@sjmulder sjmulder closed this Dec 16, 2018
@sjmulder sjmulder reopened this Dec 16, 2018
@sjmulder sjmulder merged commit 82eaec2 into sjmulder:master Dec 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants