Terraria.ModLoader.PlayerHooks.SendCustomBiomes C# (CSharp) Method

SendCustomBiomes() private static method

private static SendCustomBiomes ( ModPlayer modPlayer, BinaryWriter writer ) : bool
modPlayer ModPlayer
writer System.IO.BinaryWriter
return bool
        private static bool SendCustomBiomes(ModPlayer modPlayer, BinaryWriter writer)
        {
            byte[] data;
            using (MemoryStream stream = new MemoryStream())
            {
                using (BinaryWriter customWriter = new BinaryWriter(stream))
                {
                    modPlayer.SendCustomBiomes(customWriter);
                    customWriter.Flush();
                    data = stream.ToArray();
                }
            }
            if (data.Length > 0)
            {
                writer.Write(modPlayer.mod.Name);
                writer.Write(modPlayer.Name);
                writer.Write((byte)data.Length);
                writer.Write(data);
                return true;
            }
            return false;
        }

Same methods

PlayerHooks::SendCustomBiomes ( Player player, BinaryWriter writer ) : void