Merge pull request #306 from kenzierocks/hotfix/taglistchopped

Forge: Fix NBT tag lists being truncated.
This commit is contained in:
sk89q 2014-10-23 16:39:58 -07:00
commit a9fe7049b7

View File

@ -178,7 +178,8 @@ public static ListTag fromNative(NBTTagList other) {
other = (NBTTagList) other.copy(); other = (NBTTagList) other.copy();
List<Tag> list = new ArrayList<Tag>(); List<Tag> list = new ArrayList<Tag>();
Class<? extends Tag> listClass = StringTag.class; Class<? extends Tag> listClass = StringTag.class;
for (int i = 0; i < other.tagCount(); i++) { int tags = other.tagCount();
for (int i = 0; i < tags; i++) {
Tag child = fromNative(other.removeTag(0)); Tag child = fromNative(other.removeTag(0));
list.add(child); list.add(child);
listClass = child.getClass(); listClass = child.getClass();