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:
Ursprung
a0195c59cc
Commit
d59749fb03
@ -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);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren