SendCustomBiomes() public method

public SendCustomBiomes ( BinaryWriter writer ) : void
writer System.IO.BinaryWriter
return void
Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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;
 }