Beispiel #1
0
 public byte[] Export()
 {
     byte[] buffer;
     using (var stream = new MemoryStream())
     {
         var writer = new NbtBinaryWriter(stream, false);
         writer.Write(Health);
         writer.Write(Air);
         writer.Write(FireTick);
         writer.Write(IsOnFire);
         buffer = stream.GetBuffer();
     }
     return(buffer);
 }
Beispiel #2
0
 public byte[] Export()
 {
     byte[] buffer;
     using (var stream = new MemoryStream())
     {
         var writer = new NbtBinaryWriter(stream, false);
         writer.Write(Health);
         writer.Write(Air);
         writer.Write(FireTick);
         writer.Write(IsOnFire);
         buffer = stream.GetBuffer();
     }
     return buffer;
 }
Beispiel #3
0
 public override long ReadInt64()
 {
     return(BitConverter.IsLittleEndian == _bigEndian?NbtBinaryWriter.Swap(base.ReadInt64()) : base.ReadInt64());
 }