Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 00:50:13 +01:00
Fix empty compound reading
Dieser Commit ist enthalten in:
Ursprung
0ec1116a9e
Commit
b0fc931ecd
@ -65,6 +65,11 @@ import java.util.stream.IntStream;
|
||||
public CompoundTag compound() throws StringTagParseException {
|
||||
this.buffer.expect(Tokens.COMPOUND_BEGIN);
|
||||
final CompoundTag compoundTag = new CompoundTag("");
|
||||
if (this.buffer.peek() == Tokens.COMPOUND_END) {
|
||||
this.buffer.take();
|
||||
return compoundTag;
|
||||
}
|
||||
|
||||
while (this.buffer.hasMore()) {
|
||||
final String key = this.key();
|
||||
final Tag tag = this.tag();
|
||||
|
@ -39,10 +39,9 @@ public class ComponentRewriter1_13 extends ComponentRewriter {
|
||||
CompoundTag tag;
|
||||
try {
|
||||
tag = BinaryTagIO.readString(text);
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
Via.getPlatform().getLogger().warning("Error reading NBT in show_item:" + text);
|
||||
e.printStackTrace();
|
||||
return;
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
CompoundTag itemTag = tag.get("tag");
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren