3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-08 17:20:24 +01:00

Fix legacy nbt parsing

Dieser Commit ist enthalten in:
KennyTV 2020-06-29 18:06:23 +02:00
Ursprung a0195c59cc
Commit d59749fb03
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -89,7 +89,12 @@ import java.util.stream.IntStream;
public ListTag list() throws StringTagParseException { public ListTag list() throws StringTagParseException {
final ListTag listTag = new ListTag(""); final ListTag listTag = new ListTag("");
this.buffer.expect(Tokens.ARRAY_BEGIN); this.buffer.expect(Tokens.ARRAY_BEGIN);
final boolean prefixedIndex = this.buffer.peek() == '0' && this.buffer.peek(1) == ':';
while (this.buffer.hasMore()) { while (this.buffer.hasMore()) {
if (prefixedIndex) {
this.buffer.takeUntil(':');
}
final Tag next = this.tag(); final Tag next = this.tag();
// TODO: validate type // TODO: validate type
listTag.add(next); listTag.add(next);