diff --git a/common/src/main/java/us/myles/ViaVersion/api/minecraft/nbt/TagStringReader.java b/common/src/main/java/us/myles/ViaVersion/api/minecraft/nbt/TagStringReader.java index 22e461905..85cbce6e7 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/minecraft/nbt/TagStringReader.java +++ b/common/src/main/java/us/myles/ViaVersion/api/minecraft/nbt/TagStringReader.java @@ -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(); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/ComponentRewriter1_13.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/ComponentRewriter1_13.java index 79addbe8c..7ce412e99 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/ComponentRewriter1_13.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/ComponentRewriter1_13.java @@ -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");