code: @SuppressWarnings ("unchecked")
      private void writeListTagPayload(ListTag<?> tag) throws IOException {
          Class<? extends Tag<?>> clazz = tag.getElementType();
          List<Tag<?>> tags = (List<Tag<?>>) tag.getValue();
          int size = tags.size();
  
          os.writeByte(TagType.getByTagClass(clazz).getId());
          os.writeInt(size);
          for (Tag<?> tag1 : tags) {
              writeTagPayload(tag1);
          }
      }
docs: Writes a {@code TAG_List} tag.
  
  @param tag The tag.
  @throws java.io.IOException if an I/O error occurs.