private void ReadRecipeStackArray(BinaryReader reader, ref RecipeQueueItem[] recipeQueueItem)
        {
            int num = (int)reader.ReadByte();

            recipeQueueItem = new RecipeQueueItem[num];

            for (int i = 0; i < num; ++i)
            {
                recipeQueueItem[i] = new RecipeQueueItem();
                recipeQueueItem[i].Read(reader);
            }
        }
        private void WriteRecipeStackArray(BinaryWriter writer, RecipeQueueItem[] recipeQueueItem)
        {
            byte length = (byte)((recipeQueueItem == null) ? 0 : ((byte)recipeQueueItem.Length));

            writer.Write(length);

            for (int i = 0; i < length; ++i)
            {
                if (recipeQueueItem[i] == null)
                {
                    recipeQueueItem[i]            = new RecipeQueueItem();
                    recipeQueueItem[i].multiplier = new Value <int>(0);
                    recipeQueueItem[i].recipe     = null;
                    recipeQueueItem[i].isCrafting = new Value <bool>(false);
                }

                recipeQueueItem[i].Write(writer);
            }
        }