public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Header = reader.ReadString();
            Footer = reader.ReadString();

            return this;
        }
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            URL = reader.ReadString();
            Hash = reader.ReadString();

            return this;
        }
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Header = reader.ReadString();
            Footer = reader.ReadString();

            return(this);
        }
Exemplo n.º 4
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            UUID     = reader.ReadString();
            Username = reader.ReadString();

            return(this);
        }
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            URL  = reader.ReadString();
            Hash = reader.ReadString();

            return(this);
        }
Exemplo n.º 6
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            ObjectiveName  = reader.ReadString();
            Mode           = reader.ReadSByte();
            ObjectiveValue = reader.ReadString();
            Type           = reader.ReadString();

            return(this);
        }
Exemplo n.º 7
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            Label   = reader.ReadString();
            Action  = reader.ReadString();
            KeyCode = reader.ReadInt();
            KeyMods = (KeyMods)reader.ReadByte();

            return(this);
        }
Exemplo n.º 8
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            ProtocolVersion = reader.ReadByte();
            Username        = reader.ReadString();
            VerificationKey = reader.ReadString();
            UnUsed          = reader.ReadByte();

            return(this);
        }
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            ObjectiveName = reader.ReadString();
            Mode = reader.ReadSByte();
            ObjectiveValue = reader.ReadString();
            Type = reader.ReadString();

            return this;
        }
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            Label = reader.ReadString();
            Action = reader.ReadString();
            KeyCode = reader.ReadInt();
            KeyMods = (KeyMods) reader.ReadByte();

            return this;
        }
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            ProtocolVersion = reader.ReadByte();
            Username = reader.ReadString();
            VerificationKey = reader.ReadString();
            UnUsed = reader.ReadByte();

            return this;
        }
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            ProtocolVersion = reader.ReadByte();
            ServerName = reader.ReadString();
            ServerMOTD = reader.ReadString();
            UserType = (UserType) reader.ReadByte();

            return this;
        }
Exemplo n.º 13
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            ProtocolVersion = reader.ReadByte();
            ServerName      = reader.ReadString();
            ServerMOTD      = reader.ReadString();
            UserType        = (UserType)reader.ReadByte();

            return(this);
        }
Exemplo n.º 14
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            Username = reader.ReadString();
            Protocol1 = reader.ReadInt();
            Protocol2 = reader.ReadInt();
            ClientID = reader.ReadInt();
            RealmsData = reader.ReadString();

            return this;
        }
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            NameID     = reader.ReadShort();
            PlayerName = reader.ReadString();
            ListName   = reader.ReadString();
            GroupName  = reader.ReadString();
            GroupRank  = reader.ReadByte();

            return(this);
        }
Exemplo n.º 16
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            Username   = reader.ReadString();
            Protocol1  = reader.ReadInt();
            Protocol2  = reader.ReadInt();
            ClientID   = reader.ReadInt();
            RealmsData = reader.ReadString();

            return(this);
        }
Exemplo n.º 17
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            WindowID = reader.ReadByte();
            InventoryType = reader.ReadString();
            WindowTitle = reader.ReadString();
            NumberOfSlots = reader.ReadByte();
            if (InventoryType == "EntityHorse")
                EntityID = reader.ReadInt();

            return this;
        }
Exemplo n.º 18
0
        public ITeam FromReader(IMinecraftDataReader reader)
        {
            TeamDisplayName = reader.ReadString();
            TeamPrefix = reader.ReadString();
            TeamSuffix = reader.ReadString();
            FriendlyFire = reader.ReadByte();
            NameTagVisibility = reader.ReadString();
            Color = reader.ReadByte();

            return this;
        }
Exemplo n.º 19
0
        public ITeam FromReader(IMinecraftDataReader reader)
        {
            TeamDisplayName   = reader.ReadString();
            TeamPrefix        = reader.ReadString();
            TeamSuffix        = reader.ReadString();
            FriendlyFire      = reader.ReadByte();
            NameTagVisibility = reader.ReadString();
            Color             = reader.ReadByte();

            return(this);
        }
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            EntityID = reader.ReadByte();
            InGameName = reader.ReadString();
            SkinName = reader.ReadString();
            SpawnLocation = Position.FromReaderShort(reader);
            SpawnYaw = reader.ReadByte();
            SpawnPitch = reader.ReadByte();

            return this;
        }
Exemplo n.º 21
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Location = Position.FromReaderLong(reader);
            Text     = new string[4];
            Text[0]  = reader.ReadString();
            Text[1]  = reader.ReadString();
            Text[2]  = reader.ReadString();
            Text[3]  = reader.ReadString();

            return(this);
        }
Exemplo n.º 22
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Location = Position.FromReaderLong(reader);
            Text = new string[4];
            Text[0] = reader.ReadString();
            Text[1] = reader.ReadString();
            Text[2] = reader.ReadString();
            Text[3] = reader.ReadString();

            return this;
        }
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            EntityID      = reader.ReadByte();
            InGameName    = reader.ReadString();
            SkinName      = reader.ReadString();
            SpawnLocation = Position.FromReaderShort(reader);
            SpawnYaw      = reader.ReadByte();
            SpawnPitch    = reader.ReadByte();

            return(this);
        }
Exemplo n.º 24
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            ScoreName = reader.ReadString();
            RemoveItem = reader.ReadBoolean();
            if (RemoveItem)
            {
                ObjectiveName = reader.ReadString();
                Value = reader.ReadInt();
            }

            return this;
        }
Exemplo n.º 25
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            ScoreName  = reader.ReadString();
            RemoveItem = reader.ReadBoolean();
            if (RemoveItem)
            {
                ObjectiveName = reader.ReadString();
                Value         = reader.ReadInt();
            }

            return(this);
        }
Exemplo n.º 26
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            WindowID      = reader.ReadByte();
            InventoryType = reader.ReadString();
            WindowTitle   = reader.ReadString();
            NumberOfSlots = reader.ReadByte();
            if (InventoryType == "EntityHorse")
            {
                EntityID = reader.ReadInt();
            }

            return(this);
        }
        public IPlayerList FromReader(IMinecraftDataReader reader)
        {
            Name       = reader.ReadString();
            Properties = PlayerListActionProperties.FromReader(reader);

            Gamemode       = reader.ReadVarInt();
            Ping           = reader.ReadVarInt();
            HasDisplayName = reader.ReadBoolean();
            if (HasDisplayName)
            {
                DisplayName = reader.ReadString();
            }

            return(this);
        }
Exemplo n.º 28
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            PlayerID = reader.ReadSByte();
            Message = reader.ReadString();

            return this;
        }
Exemplo n.º 29
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            AppName        = reader.ReadString();
            ExtensionCount = reader.ReadShort();

            return(this);
        }
Exemplo n.º 30
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            EntityID = reader.ReadByte();
            ModelName = reader.ReadString();

            return this;
        }
Exemplo n.º 31
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Count = reader.ReadVarInt();
            Text = reader.ReadString();

            return this;
        }
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Hash   = reader.ReadString();
            Result = (ResourcePackStatus)reader.ReadVarInt();

            return(this);
        }
Exemplo n.º 33
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            TeamName = reader.ReadString();
            Action   = (TeamAction)reader.ReadByte();

            switch (Action)
            {
            case TeamAction.CreateTeam:
                Team = new TeamsCreateTeam().FromReader(reader);
                break;

            case TeamAction.RemoveTeam:
                Team = new TeamsRemoveTeam().FromReader(reader);
                break;

            case TeamAction.UpdateTeam:
                Team = new TeamsUpdateTeam().FromReader(reader);
                break;

            case TeamAction.AddPlayers:
                Team = new TeamsAddPlayers().FromReader(reader);
                break;

            case TeamAction.RemovePlayers:
                Team = new TeamsRemovePlayers().FromReader(reader);
                break;
            }

            return(this);
        }
Exemplo n.º 34
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Count = reader.ReadVarInt();
            Text  = reader.ReadString();

            return(this);
        }
Exemplo n.º 35
0
        public static EntityPropertyList FromReader(IMinecraftDataReader reader)
        {
            var count = reader.ReadInt();

            var value = new EntityPropertyList();

            for (int i = 0; i < count; i++)
            {
                var property = new EntityProperty();

                property.Key   = reader.ReadString();
                property.Value = (float)reader.ReadDouble();
                var listLength = reader.ReadVarInt();

                property.Modifiers = new Modifiers[listLength];
                for (var j = 0; j < listLength; j++)
                {
                    var item = new Modifiers
                    {
                        UUID      = reader.ReadBigInteger(),
                        Amount    = (float)reader.ReadDouble(),
                        Operation = reader.ReadSByte()
                    };

                    property.Modifiers[j] = item;
                }

                value[i] = property;
            }

            return(value);
        }
Exemplo n.º 36
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            ExtName = reader.ReadString();
            Version = reader.ReadInt();

            return(this);
        }
Exemplo n.º 37
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            EntityID  = reader.ReadByte();
            ModelName = reader.ReadString();

            return(this);
        }
Exemplo n.º 38
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            AppName = reader.ReadString();
            ExtensionCount = reader.ReadShort();

            return this;
        }
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Position = (ScoreboardPosition) reader.ReadSByte();
            ScoreName = reader.ReadString();

            return this;
        }
Exemplo n.º 40
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            UnUsed  = reader.ReadByte();
            Message = reader.ReadString();

            return(this);
        }
Exemplo n.º 41
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Message = reader.ReadString();
            Position = (ChatMessagePosition) reader.ReadByte();

            return this;
        }
Exemplo n.º 42
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Message  = reader.ReadString();
            Position = (ChatMessagePosition)reader.ReadByte();

            return(this);
        }
Exemplo n.º 43
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Position  = (ScoreboardPosition)reader.ReadSByte();
            ScoreName = reader.ReadString();

            return(this);
        }
        public IPlayerList FromReader(IMinecraftDataReader reader)
        {
            HasDisplayName = reader.ReadBoolean();
            DisplayName    = reader.ReadString();

            return(this);
        }
Exemplo n.º 45
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Text          = reader.ReadString();
            HasPosition   = reader.ReadBoolean();
            LookedAtBlock = Position.FromReaderLong(reader);

            return(this);
        }
Exemplo n.º 46
0
        public ICombatEvent FromReader(IMinecraftDataReader reader)
        {
            PlayerID = reader.ReadVarInt();
            EntityID = reader.ReadInt();
            Message = reader.ReadString();

            return this; // Hope works
        }
Exemplo n.º 47
0
        public ICombatEvent FromReader(IMinecraftDataReader reader)
        {
            PlayerID = reader.ReadVarInt();
            EntityID = reader.ReadInt();
            Message  = reader.ReadString();

            return(this); // Hope works
        }
Exemplo n.º 48
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Text = reader.ReadString();
            HasPosition = reader.ReadBoolean();
            LookedAtBlock = Position.FromReaderLong(reader);

            return this;
        }
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Channel = reader.ReadString();
            var length = reader.ReadVarInt();
            Data = reader.ReadByteArray(length);

            return this;
        }
Exemplo n.º 50
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Dimension = (Dimension) reader.ReadInt();
            Difficulty = (Difficulty) reader.ReadByte();
            GameMode = (GameMode) reader.ReadByte();
            LevelType = reader.ReadString();

            return this;
        }
Exemplo n.º 51
0
        public ITeam FromReader(IMinecraftDataReader reader)
        {
            TeamDisplayName = reader.ReadString();
            TeamPrefix = reader.ReadString();
            TeamSuffix = reader.ReadString();
            FriendlyFire = reader.ReadByte();
            NameTagVisibility = reader.ReadString();
            Color = reader.ReadByte();

            var count = reader.ReadVarInt();
            Players = new string[count];
            for (var i = 0; i < count; i++)
            {
                Players[i] = reader.ReadString();
            }

            return this;
        }
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            EntityID = reader.ReadVarInt();
            Title = reader.ReadString();
            Location = Position.FromReaderLong(reader);
            Direction = reader.ReadInt();

            return this;
        }
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            TextureURL = reader.ReadString();
            SideBlock = reader.ReadByte();
            EdgeBlock = reader.ReadByte();
            SideLevel = reader.ReadShort();

            return this;
        }
Exemplo n.º 54
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Dimension  = (Dimension)reader.ReadInt();
            Difficulty = (Difficulty)reader.ReadByte();
            GameMode   = (GameMode)reader.ReadByte();
            LevelType  = reader.ReadString();

            return(this);
        }
Exemplo n.º 55
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            SoundName = reader.ReadString();
            Coordinates = Position.FromReaderInt(reader);
            Volume = reader.ReadFloat();
            Pitch = reader.ReadByte();

            return this;
        }
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Channel = reader.ReadString();
            int length = reader.ReadShort();

            Data = reader.ReadByteArray(length);

            return(this);
        }
Exemplo n.º 57
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            PlayerID = reader.ReadSByte();
            PlayerName = reader.ReadString();
            Coordinates = Position.FromReaderShort(reader);
            Yaw = reader.ReadByte();
            Pitch = reader.ReadByte();

            return this;
        }
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Locale = reader.ReadString();
            ViewDistance = reader.ReadByte();
            ChatFlags = (ChatFlags) reader.ReadByte();
            ChatColours = reader.ReadBoolean();
            DisplayedSkinParts = DisplayedSkinParts.FromReader(reader);

            return this;
        }
Exemplo n.º 59
0
        public static StatisticsEntryList FromReader(IMinecraftDataReader reader)
        {
            var count = reader.ReadVarInt();

            var value = new StatisticsEntryList();
            for (int i = 0; i < count; i++)
                value[i] = new StatisticsEntry { StatisticsName = reader.ReadString(), Value = reader.ReadVarInt() };
            

            return value;
        }
        public static PlayerListActionProperties FromReader(IMinecraftDataReader reader)
        {
            var count = reader.ReadVarInt();

            var value = new PlayerListActionProperties();
            for (var i = 0; i < count; i++)
            {
                var property = new Properties();

                property.Name = reader.ReadString();
                property.Value = reader.ReadString();
                property.IsSigned = reader.ReadBoolean();

                if (property.IsSigned)
                    property.Signature = reader.ReadString();

                value[i] = property;
            }

            return value;
        }