Skip to content

Commit

Permalink
simplify CompoundTag serialization code
Browse files Browse the repository at this point in the history
  • Loading branch information
Querz committed Jan 28, 2019
1 parent db5fffa commit 7e75cdb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/net/querz/nbt/CompoundTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,7 @@ public Tag<?> putLongArray(String key, long[] value) {
@Override
public void serializeValue(DataOutputStream dos, int depth) throws IOException {
for (Map.Entry<String, Tag<?>> e : getValue().entrySet()) {
dos.writeByte(e.getValue().getID());
dos.writeUTF(e.getKey());
e.getValue().serializeValue(dos, decrementDepth(depth));
e.getValue().serialize(dos, e.getKey(), decrementDepth(depth));
}
EndTag.INSTANCE.serialize(dos, depth);
}
Expand Down

0 comments on commit 7e75cdb

Please sign in to comment.