/// <summary> /// Sends the item. /// </summary> /// <param name="stream">The stream.</param> /// <param name="version">The version.</param> /// <remarks></remarks> public void SendItem(BigEndianStream stream, int version) { if (stream == null) throw new ArgumentNullException("stream"); if (Data != null && !Changed && stream.BufferEnabled) { stream.Write(Data.ToArray(), 0, Data.Count()); } else OnSend(stream, version); stream.Flush(); }
private void CreateRegionFile(Stream stream, short sectorSize = 128) { BigEndianStream endianStream = new BigEndianStream(stream); { endianStream.Write(sectorSize); endianStream.Write(new byte[32 * 32 * 16 * 4], 0, 32 * 32 * 16 * 4); // Write Empty Header endianStream.Flush(); stream.Seek(0, SeekOrigin.Begin); } }