Exemplo n.º 1
0
 public void ReadPacket(MinecraftStream stream)
 {
     EntityId = stream.ReadInt32();
     X = stream.ReadInt32();
     Y = stream.ReadUInt8();
     Z = stream.ReadInt32();
     Data = stream.ReadInt32();
     DisableRelativeVolume = stream.ReadBoolean();
 }
Exemplo n.º 2
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     Target = stream.ReadInt32();
     RightClick = stream.ReadBoolean();
     return mode;
 }
Exemplo n.º 3
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     EntityId = stream.ReadInt32();
     GameMode = (GameMode)stream.ReadUInt8();
     Dimension = (Dimension)stream.ReadInt8();
     Difficulty = (Difficulty)stream.ReadUInt8();
     MaxPlayers = stream.ReadUInt8();
     LevelType = stream.ReadString();
     ReducdedDebug = stream.ReadBoolean();
     return mode;
 }
Exemplo n.º 4
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     WindowId = stream.ReadUInt8();
     ActionNumber = stream.ReadInt16();
     Accepted = stream.ReadBoolean();
     return mode;
 }
Exemplo n.º 5
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     ItemName = stream.ReadString();
     RemoveItem = stream.ReadBoolean();
     if (!RemoveItem)
     {
         ScoreName = stream.ReadString();
         Value = stream.ReadInt32();
     }
     return mode;
 }
Exemplo n.º 6
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     X = stream.ReadInt32();
     Z = stream.ReadInt32();
     GroundUpContinuous = stream.ReadBoolean();
     PrimaryBitMap = stream.ReadUInt16();
     var length = stream.ReadVarInt();
     Data = stream.ReadUInt8Array(length);
     return mode;
 }
Exemplo n.º 7
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     EffectId = stream.ReadInt32();
     X = stream.ReadInt32();
     Y = stream.ReadUInt8();
     Z = stream.ReadInt32();
     Data = stream.ReadInt32();
     DisableRelativeVolume = stream.ReadBoolean();
     return mode;
 }
Exemplo n.º 8
0
 public void ReadPacket(MinecraftStream stream)
 {
     Name = stream.ReadString();
     DisplayName = stream.ReadString();
     RemoveBoard = stream.ReadBoolean();
 }
Exemplo n.º 9
0
 public void ReadPacket(MinecraftStream stream)
 {
     ItemName = stream.ReadString();
     RemoveItem = stream.ReadBoolean();
     if (!RemoveItem)
     {
         ScoreName = stream.ReadString();
         Value = stream.ReadInt32();
     }
 }
Exemplo n.º 10
0
 public void ReadPacket(MinecraftStream stream)
 {
     PlayerName = stream.ReadString();
     Online = stream.ReadBoolean();
     Ping = stream.ReadInt16();
 }
Exemplo n.º 11
0
 public void ReadPacket(MinecraftStream stream)
 {
     Locale = stream.ReadString();
     ViewDistance = stream.ReadUInt8();
     ChatFlags = (ChatMode)(stream.ReadUInt8() & 0x3);
     Difficulty = (Difficulty)stream.ReadUInt8();
     ShowCape = stream.ReadBoolean();
 }
Exemplo n.º 12
0
 public void ReadPacket(MinecraftStream stream)
 {
     User = stream.ReadInt32();
     Target = stream.ReadInt32();
     LeftClick = stream.ReadBoolean();
 }
Exemplo n.º 13
0
 public void ReadPacket(MinecraftStream stream)
 {
     WindowId = stream.ReadUInt8();
     ActionNumber = stream.ReadInt16();
     Accepted = stream.ReadBoolean();
 }
Exemplo n.º 14
0
 public void ReadPacket(MinecraftStream stream)
 {
     WindowId = stream.ReadUInt8();
     InventoryType = stream.ReadUInt8();
     WindowTitle = stream.ReadString();
     SlotCount = stream.ReadUInt8();
     UseProvidedTitle = stream.ReadBoolean();
     if (InventoryType == 11)
         Unknown = stream.ReadInt32();
 }
Exemplo n.º 15
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     EntityId = stream.ReadInt32();
     VehicleId = stream.ReadInt32();
     Leash = stream.ReadBoolean();
     return mode;
 }
Exemplo n.º 16
0
 public void ReadPacket(MinecraftStream stream)
 {
     OnGround = stream.ReadBoolean();
 }
Exemplo n.º 17
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     EntityId = stream.ReadVarInt();
     EffectId = stream.ReadUInt8();
     Amplifier = stream.ReadUInt8();
     Duration = stream.ReadVarInt();
     HideParticles = stream.ReadBoolean();
     return mode;
 }
Exemplo n.º 18
0
 public void ReadPacket(MinecraftStream stream)
 {
     Yaw = stream.ReadSingle();
     Pitch = stream.ReadSingle();
     OnGround = stream.ReadBoolean();
 }
Exemplo n.º 19
0
        public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
        {
            ChunkCount = stream.ReadInt16();
            var length = stream.ReadInt32();
            LightIncluded = stream.ReadBoolean();
            ChunkData = stream.ReadUInt8Array(length);

            ChunkMetadata = new Metadata[ChunkCount];
            for (int i = 0; i < ChunkCount; i++)
            {
                var metadata = new Metadata();
                metadata.ChunkX = stream.ReadInt32();
                metadata.ChunkZ = stream.ReadInt32();
                metadata.PrimaryBitMap = stream.ReadUInt16();
                metadata.AddBitMap = stream.ReadUInt16();
                ChunkMetadata[i] = metadata;
            }
            return mode;
        }
Exemplo n.º 20
0
 public void ReadPacket(MinecraftStream stream)
 {
     X = stream.ReadDouble();
     Y = stream.ReadDouble();
     Stance = stream.ReadDouble();
     Z = stream.ReadDouble();
     Yaw = stream.ReadSingle();
     Pitch = stream.ReadSingle();
     OnGround = stream.ReadBoolean();
 }
Exemplo n.º 21
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     WindowId = stream.ReadUInt8();
     InventoryType = stream.ReadUInt8();
     WindowTitle = stream.ReadString();
     SlotCount = stream.ReadUInt8();
     UseProvidedTitle = stream.ReadBoolean();
     if (InventoryType == 11)
         EntityId = stream.ReadInt32();
     return mode;
 }
Exemplo n.º 22
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     X = stream.ReadDouble();
     Stance = stream.ReadDouble();
     Y = stream.ReadDouble();
     Z = stream.ReadDouble();
     OnGround = stream.ReadBoolean();
     return mode;
 }
Exemplo n.º 23
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     PlayerName = stream.ReadString();
     Online = stream.ReadBoolean();
     Ping = stream.ReadInt16();
     return mode;
 }
Exemplo n.º 24
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     Yaw = stream.ReadSingle();
     Pitch = stream.ReadSingle();
     OnGround = stream.ReadBoolean();
     return mode;
 }
Exemplo n.º 25
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     TeamName = stream.ReadString();
     PacketMode = (TeamMode)stream.ReadUInt8();
     if (PacketMode == TeamMode.CreateTeam || PacketMode == TeamMode.UpdateTeam)
     {
         DisplayName = stream.ReadString();
         TeamPrefix = stream.ReadString();
         TeamSuffix = stream.ReadString();
         EnableFriendlyFire = stream.ReadBoolean();
     }
     if (PacketMode == TeamMode.CreateTeam || PacketMode == TeamMode.AddPlayers ||
         PacketMode == TeamMode.RemovePlayers)
     {
         var playerCount = stream.ReadInt16();
         Players = new string[playerCount];
         for (int i = 0; i < playerCount; i++)
             Players[i] = stream.ReadString();
     }
     return mode;
 }
Exemplo n.º 26
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     X = stream.ReadDouble();
     if (direction == PacketDirection.Serverbound)
         Stance = stream.ReadDouble();
     Y = stream.ReadDouble();
     Z = stream.ReadDouble();
     Yaw = stream.ReadSingle();
     Pitch = stream.ReadSingle();
     OnGround = stream.ReadBoolean();
     return mode;
 }
Exemplo n.º 27
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     Horizontal = stream.ReadSingle();
     Forward = stream.ReadSingle();
     Jump = stream.ReadBoolean();
     Unmount = stream.ReadBoolean();
     return mode;
 }
Exemplo n.º 28
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     EntityId = stream.ReadVarInt();
     X = stream.ReadInt32();
     Y = stream.ReadInt32();
     Z = stream.ReadInt32();
     Yaw = stream.ReadUInt8();
     Pitch = stream.ReadUInt8();
     OnGround = stream.ReadBoolean();
     return mode;
 }
Exemplo n.º 29
0
 public NetworkMode ReadPacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     Locale = stream.ReadString();
     ViewDistance = stream.ReadUInt8();
     var flags = stream.ReadUInt8();
     ChatFlags = (ChatMode)(flags & 0x3);
     ColorEnabled = stream.ReadBoolean();
     Difficulty = (Difficulty)stream.ReadUInt8();
     ShowCape = stream.ReadBoolean();
     return mode;
 }
Exemplo n.º 30
0
        public void ReadPacket(MinecraftStream stream)
        {
            ChunkCount = stream.ReadInt16();
            var length = stream.ReadInt32();
            LightIncluded = stream.ReadBoolean();
            ChunkData = stream.ReadUInt8Array(length);

            ChunkMetadata = new Metadata[ChunkCount];
            for (int i = 0; i < ChunkCount; i++)
            {
                var metadata = new Metadata();
                metadata.ChunkX = stream.ReadInt32();
                metadata.ChunkZ = stream.ReadInt32();
                metadata.PrimaryBitMap = stream.ReadUInt16();
                metadata.AddBitMap = stream.ReadUInt16();
                ChunkMetadata[i] = metadata;
            }
        }