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

Support the long array tag#10

Open
jamierocks wants to merge 1 commit into
SpongePowered:developfrom
jamierocks:feature/long-array
Open

Support the long array tag#10
jamierocks wants to merge 1 commit into
SpongePowered:developfrom
jamierocks:feature/long-array

Conversation

@jamierocks

Copy link
Copy Markdown

This tag was introduced with MC 1.12.

This should address #9.

@coveralls

coveralls commented Jun 10, 2018

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
Author

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

This tag was introduced with MC 1.12.
@SebastianCelejewski

Copy link
Copy Markdown

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

@kashike

kashike commented Oct 27, 2018

Copy link
Copy Markdown
Contributor

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

@piegamesde

Copy link
Copy Markdown

@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

kashike commented Oct 28, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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
Copy Markdown

@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

kashike commented Oct 29, 2018

Copy link
Copy Markdown
Contributor

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