Skip to content
This repository has been archived by the owner on Jun 26, 2019. It is now read-only.

Support the long array tag #10

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jamierocks
Copy link

This tag was introduced with MC 1.12.

This should address #9.

@coveralls
Copy link

coveralls commented Jun 10, 2018

Coverage Status

Coverage increased (+2.6%) to 16.196% when pulling f0438cd on jamierocks:feature/long-array into 7a1b6d9 on flow:develop.

@piegamesde
Copy link

Took me hours to find it, but you have a copy/paste error:
case TAG_LONG_ARRAY:
length = is.readInt();
long[] longs = new long[length];
for (int i = 0; i < length; i++) {
longs[i] = is.readInt(); // <-- HERE
}
return new LongArrayTag(name, longs);

Lesson learned, I will look if I can improve the error messages when reading ill-formed NBT. "Tag type id " + id + " is unknown!" is not very helpful if you don't know where the error comes from

@jamierocks
Copy link
Author

Oops. Will correct that, thanks for pointing it out 👍.

This tag was introduced with MC 1.12.
@SebastianCelejewski
Copy link

I am really looking forward for this pull request to be merged.

@kashike
Copy link
Contributor

kashike commented Oct 27, 2018

@SebastianCelejewski You'd be better off using a different library.

@piegamesde
Copy link

@SebastianCelejewski @kashike I am trying to maintain this library in my fork. It is not a "hard" fork though, so if you want to use it with Maven you need jitpack.io: https://jitpack.io/#piegamesde/nbt/

But if I see other people are using it, I will try to make a proper release on Maven.

Currently, I've merged the long tag branch and added some library functionality to deal with region files and reading worlds in 1.13.

@kashike
Copy link
Contributor

kashike commented Oct 28, 2018

You'd still be better off using a different library, in my opinion. This one isn't that great at all compared to other libraries around.

@SebastianCelejewski
Copy link

I've been using this library for some time for my Minecraft plugins. I discovered problem with arrays of longs when I was upgrading my stuff to 1.13. I manually injected this pull request into my local fork, recompiled successfully, and it works fine. I don't need other library, this is just fine.

@piegamesde
Copy link

@kashike Do you have any suggestion of what to use instead? I only use this one because it's the best one I could find.

@kashike
Copy link
Contributor

kashike commented Oct 29, 2018

I'm a bit biased since I have my own (https://github.com/KyoriPowered/nbt), but you can look through https://github.com/topics/nbt?l=java.

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.

5 participants