Beispiel #1
0
 void IPacketSerializable.Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(version);
     bw.WriteVarString(address);
     bw.Write(port);
     bw.WriteVarInt((uint)nextState);
 }
Beispiel #2
0
        public async void SerializeAsync(Stream stream)
        {
            var length = (uint)data.Count + packetId.SizeofBytes();

            using (var bw = new NetworkWrite(stream, Encoding.UTF8, true))
            {
                bw.WriteVarInt(length);
                bw.WriteVarInt(packetId);
                bw.Flush();
            }

            await stream.WriteAsync(data.Array, data.Offset, data.Count);
        }
Beispiel #3
0
 public void Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(entityID);
     bw.Write(entityUUID);
     bw.WriteVarInt(type);
     bw.Write(x);
     bw.Write(y);
     bw.Write(z);
     bw.Write(yaw);
     bw.Write(pitch);
     bw.Write(head);
     bw.Write(velocityX);
     bw.Write(velocityY);
     bw.Write(velocityZ);
     bw.Write(metaData);
 }
Beispiel #4
0
 public void Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(entityID);
     bw.Write(entityUUID);
     bw.Write(title);
     bw.Write(position, 0, 8);
     bw.Write(direction);
 }
Beispiel #5
0
 public void Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(entityID);
     bw.Write(type);
     bw.Write(x);
     bw.Write(y);
     bw.Write(z);
 }
Beispiel #6
0
 public void Serialize(NetworkWrite bw)
 {
     bw.Write(chunkX);
     bw.Write(chunkZ);
     bw.Write(groundUpContinuous);
     bw.WriteVarInt(primaryBitMask);
     bw.WriteVarBytes(data);
     bw.WriteVarBytes(entities);
 }
Beispiel #7
0
 public void Serialize(NetworkWrite bw)
 {
     bw.Write(x);
     bw.Write(y);
     bw.Write(z);
     bw.Write(yaw);
     bw.Write(pitch);
     bw.Write(flags);
     bw.WriteVarInt(teleportID);
 }
Beispiel #8
0
 public void Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(entityID);
     bw.Write(playerUUID);
     bw.Write(x);
     bw.Write(y);
     bw.Write(z);
     bw.Write(yaw);
     bw.Write(pitch);
     bw.Write(metaData);
 }
Beispiel #9
0
 public void Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(entityID);
     bw.Write(objectUUID);
     bw.Write(type);
     bw.Write(x);
     bw.Write(y);
     bw.Write(z);
     bw.Write(yaw);
     bw.Write(pitch);
     bw.Write(data);
     bw.Write(velocityX);
     bw.Write(velocityY);
     bw.Write(velocityZ);
 }
Beispiel #10
0
 public void Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(entityID);
     bw.WritePos(localtion);
 }
Beispiel #11
0
 public void Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(entityID);
     bw.Write(animation);
 }
Beispiel #12
0
 public void Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(action);
     bw.WriteVarString(tabID);
 }
Beispiel #13
0
 public void Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(action);
     bw.WriteVarInt(numberOfPlayers);
 }
Beispiel #14
0
 public void Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(keepAliveID);
 }
Beispiel #15
0
 public void Serialize(NetworkWrite bw)
 {
     bw.Write(health);
     bw.WriteVarInt(food);
     bw.Write(foodSaturation);
 }
Beispiel #16
0
 public void Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(teleportID);
 }
Beispiel #17
0
 public void Serialize(NetworkWrite bw)
 {
     bw.WriteVarInt(threshold);
 }
Beispiel #18
0
 public static void Write(this NetworkWrite bw, Hand hand)
 {
     bw.WriteVarInt((uint)hand);
 }
Beispiel #19
0
 public void Serialize(NetworkWrite bw)
 {
     bw.Write(experienceBar);
     bw.WriteVarInt(level);
     bw.WriteVarInt(totalExperience);
 }