Example #1
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteBoolean(OnGround);
 }
Example #2
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteDouble(X);
     stream.WriteDouble(Y);
     stream.WriteDouble(Stance);
     stream.WriteDouble(Z);
     stream.WriteSingle(Yaw);
     stream.WriteSingle(Pitch);
     stream.WriteBoolean(OnGround);
 }
Example #3
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteString(ItemName);
     stream.WriteBoolean(RemoveItem);
     if (!RemoveItem)
     {
         stream.WriteString(ScoreName);
         stream.WriteInt32(Value.Value);
     }
 }
Example #4
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(PacketId);
     stream.WriteString(TeamName);
     stream.WriteUInt8((byte)PacketMode);
     if (PacketMode == TeamMode.CreateTeam || PacketMode == TeamMode.UpdateTeam)
     {
         stream.WriteString(DisplayName);
         stream.WriteString(TeamPrefix);
         stream.WriteString(TeamSuffix);
         stream.WriteBoolean(EnableFriendlyFire.Value);
     }
     if (PacketMode == TeamMode.CreateTeam || PacketMode == TeamMode.AddPlayers ||
         PacketMode == TeamMode.RemovePlayers)
     {
         stream.WriteInt16((short)Players.Length);
         for (int i = 0; i < Players.Length; i++)
             stream.WriteString(Players[i]);
     }
 }
Example #5
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteString(Name);
     stream.WriteString(DisplayName);
     stream.WriteBoolean(RemoveBoard);
 }
Example #6
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteInt32(User);
     stream.WriteInt32(Target);
     stream.WriteBoolean(LeftClick);
 }
Example #7
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteString(PlayerName);
     stream.WriteBoolean(Online);
     stream.WriteInt16(Ping);
 }
Example #8
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteString(Locale);
     stream.WriteUInt8(ViewDistance);
     stream.WriteUInt8((byte)ChatFlags);
     stream.WriteUInt8((byte)Difficulty);
     stream.WriteBoolean(ShowCape);
 }
Example #9
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteUInt8(WindowId);
     stream.WriteInt16(SlotIndex);
     stream.WriteUInt8(MouseButton);
     stream.WriteInt16(ActionNumber);
     stream.WriteBoolean(Shift);
     ClickedItem.WriteTo(stream);
 }
Example #10
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteUInt8(WindowId);
     stream.WriteInt16(ActionNumber);
     stream.WriteBoolean(Accepted);
 }
Example #11
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteUInt8(WindowId);
     stream.WriteUInt8(InventoryType);
     stream.WriteString(WindowTitle);
     stream.WriteUInt8(SlotCount);
     stream.WriteBoolean(UseProvidedTitle);
 }
Example #12
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteInt32(EntityId);
     stream.WriteInt32(X);
     stream.WriteUInt8(Y);
     stream.WriteInt32(Z);
     stream.WriteInt32(Data);
     stream.WriteBoolean(DisableRelativeVolume);
 }
Example #13
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteInt16(ChunkCount);
     stream.WriteInt32(ChunkData.Length);
     stream.WriteBoolean(LightIncluded);
     stream.WriteUInt8Array(ChunkData);
     stream.WriteUInt8Array(ChunkMetadata);
 }
Example #14
0
 public void WritePacket(MinecraftStream stream)
 {
     stream.WriteUInt8(Id);
     stream.WriteInt32(X);
     stream.WriteInt32(Z);
     stream.WriteBoolean(GroundUpContinuous);
     stream.WriteUInt16(PrimaryBitMap);
     stream.WriteUInt16(AddBitMap);
     stream.WriteInt32(Data.Length);
     stream.WriteUInt8Array(Data);
 }
Example #15
0
        public void WritePacket(MinecraftStream stream)
        {
            stream.WriteUInt8(Id);
            stream.WriteInt16(ChunkCount);
            stream.WriteInt32(ChunkData.Length);
            stream.WriteBoolean(LightIncluded);
            stream.WriteUInt8Array(ChunkData);

            for (int i = 0; i < ChunkCount; i++)
            {
                stream.WriteInt32(ChunkMetadata[i].ChunkX);
                stream.WriteInt32(ChunkMetadata[i].ChunkZ);
                stream.WriteUInt16(ChunkMetadata[i].PrimaryBitMap);
                stream.WriteUInt16(ChunkMetadata[i].AddBitMap);
            }
        }