diff --git a/src/forge/java/com/sk89q/worldedit/forge/NBTConverter.java b/src/forge/java/com/sk89q/worldedit/forge/NBTConverter.java index 04f8f8258..98f88c6e8 100644 --- a/src/forge/java/com/sk89q/worldedit/forge/NBTConverter.java +++ b/src/forge/java/com/sk89q/worldedit/forge/NBTConverter.java @@ -178,7 +178,8 @@ public static ListTag fromNative(NBTTagList other) { other = (NBTTagList) other.copy(); List list = new ArrayList(); Class 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)); list.add(child); listClass = child.getClass();