public static void Write(TileData data, BinaryWriter writer) { writer.Write(data.Type); data.Data.Write(writer); }