コード例 #1
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Header = reader.ReadString();
            Footer = reader.ReadString();

            return this;
        }
コード例 #2
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            URL = reader.ReadString();
            Hash = reader.ReadString();

            return this;
        }
コード例 #3
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Header = reader.ReadString();
            Footer = reader.ReadString();

            return(this);
        }
コード例 #4
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            UUID     = reader.ReadString();
            Username = reader.ReadString();

            return(this);
        }
コード例 #5
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            URL  = reader.ReadString();
            Hash = reader.ReadString();

            return(this);
        }
コード例 #6
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            ObjectiveName  = reader.ReadString();
            Mode           = reader.ReadSByte();
            ObjectiveValue = reader.ReadString();
            Type           = reader.ReadString();

            return(this);
        }
コード例 #7
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            Label   = reader.ReadString();
            Action  = reader.ReadString();
            KeyCode = reader.ReadInt();
            KeyMods = (KeyMods)reader.ReadByte();

            return(this);
        }
コード例 #8
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            ProtocolVersion = reader.ReadByte();
            Username        = reader.ReadString();
            VerificationKey = reader.ReadString();
            UnUsed          = reader.ReadByte();

            return(this);
        }
コード例 #9
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            ObjectiveName = reader.ReadString();
            Mode = reader.ReadSByte();
            ObjectiveValue = reader.ReadString();
            Type = reader.ReadString();

            return this;
        }
コード例 #10
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            Label = reader.ReadString();
            Action = reader.ReadString();
            KeyCode = reader.ReadInt();
            KeyMods = (KeyMods) reader.ReadByte();

            return this;
        }
コード例 #11
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            ProtocolVersion = reader.ReadByte();
            Username = reader.ReadString();
            VerificationKey = reader.ReadString();
            UnUsed = reader.ReadByte();

            return this;
        }
コード例 #12
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            ProtocolVersion = reader.ReadByte();
            ServerName = reader.ReadString();
            ServerMOTD = reader.ReadString();
            UserType = (UserType) reader.ReadByte();

            return this;
        }
コード例 #13
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            ProtocolVersion = reader.ReadByte();
            ServerName      = reader.ReadString();
            ServerMOTD      = reader.ReadString();
            UserType        = (UserType)reader.ReadByte();

            return(this);
        }
コード例 #14
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            Username = reader.ReadString();
            Protocol1 = reader.ReadInt();
            Protocol2 = reader.ReadInt();
            ClientID = reader.ReadInt();
            RealmsData = reader.ReadString();

            return this;
        }
コード例 #15
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            NameID     = reader.ReadShort();
            PlayerName = reader.ReadString();
            ListName   = reader.ReadString();
            GroupName  = reader.ReadString();
            GroupRank  = reader.ReadByte();

            return(this);
        }
コード例 #16
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            Username   = reader.ReadString();
            Protocol1  = reader.ReadInt();
            Protocol2  = reader.ReadInt();
            ClientID   = reader.ReadInt();
            RealmsData = reader.ReadString();

            return(this);
        }
コード例 #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;
        }
コード例 #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;
        }
コード例 #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);
        }
コード例 #20
0
        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;
        }
コード例 #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);
        }
コード例 #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;
        }
コード例 #23
0
        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);
        }
コード例 #24
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            ScoreName = reader.ReadString();
            RemoveItem = reader.ReadBoolean();
            if (RemoveItem)
            {
                ObjectiveName = reader.ReadString();
                Value = reader.ReadInt();
            }

            return this;
        }
コード例 #25
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            ScoreName  = reader.ReadString();
            RemoveItem = reader.ReadBoolean();
            if (RemoveItem)
            {
                ObjectiveName = reader.ReadString();
                Value         = reader.ReadInt();
            }

            return(this);
        }
コード例 #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);
        }
コード例 #27
0
        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);
        }
コード例 #28
0
ファイル: Message.cs プロジェクト: beppe9000/MineLib.Network
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            PlayerID = reader.ReadSByte();
            Message = reader.ReadString();

            return this;
        }
コード例 #29
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            AppName        = reader.ReadString();
            ExtensionCount = reader.ReadShort();

            return(this);
        }
コード例 #30
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            EntityID = reader.ReadByte();
            ModelName = reader.ReadString();

            return this;
        }
コード例 #31
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Count = reader.ReadVarInt();
            Text = reader.ReadString();

            return this;
        }
コード例 #32
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Hash   = reader.ReadString();
            Result = (ResourcePackStatus)reader.ReadVarInt();

            return(this);
        }
コード例 #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);
        }
コード例 #34
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Count = reader.ReadVarInt();
            Text  = reader.ReadString();

            return(this);
        }
コード例 #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);
        }
コード例 #36
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            ExtName = reader.ReadString();
            Version = reader.ReadInt();

            return(this);
        }
コード例 #37
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            EntityID  = reader.ReadByte();
            ModelName = reader.ReadString();

            return(this);
        }
コード例 #38
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            AppName = reader.ReadString();
            ExtensionCount = reader.ReadShort();

            return this;
        }
コード例 #39
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Position = (ScoreboardPosition) reader.ReadSByte();
            ScoreName = reader.ReadString();

            return this;
        }
コード例 #40
0
ファイル: Message.cs プロジェクト: beppe9000/MineLib.Network
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            UnUsed  = reader.ReadByte();
            Message = reader.ReadString();

            return(this);
        }
コード例 #41
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Message = reader.ReadString();
            Position = (ChatMessagePosition) reader.ReadByte();

            return this;
        }
コード例 #42
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Message  = reader.ReadString();
            Position = (ChatMessagePosition)reader.ReadByte();

            return(this);
        }
コード例 #43
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Position  = (ScoreboardPosition)reader.ReadSByte();
            ScoreName = reader.ReadString();

            return(this);
        }
コード例 #44
0
        public IPlayerList FromReader(IMinecraftDataReader reader)
        {
            HasDisplayName = reader.ReadBoolean();
            DisplayName    = reader.ReadString();

            return(this);
        }
コード例 #45
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Text          = reader.ReadString();
            HasPosition   = reader.ReadBoolean();
            LookedAtBlock = Position.FromReaderLong(reader);

            return(this);
        }
コード例 #46
0
        public ICombatEvent FromReader(IMinecraftDataReader reader)
        {
            PlayerID = reader.ReadVarInt();
            EntityID = reader.ReadInt();
            Message = reader.ReadString();

            return this; // Hope works
        }
コード例 #47
0
        public ICombatEvent FromReader(IMinecraftDataReader reader)
        {
            PlayerID = reader.ReadVarInt();
            EntityID = reader.ReadInt();
            Message  = reader.ReadString();

            return(this); // Hope works
        }
コード例 #48
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Text = reader.ReadString();
            HasPosition = reader.ReadBoolean();
            LookedAtBlock = Position.FromReaderLong(reader);

            return this;
        }
コード例 #49
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Channel = reader.ReadString();
            var length = reader.ReadVarInt();
            Data = reader.ReadByteArray(length);

            return this;
        }
コード例 #50
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Dimension = (Dimension) reader.ReadInt();
            Difficulty = (Difficulty) reader.ReadByte();
            GameMode = (GameMode) reader.ReadByte();
            LevelType = reader.ReadString();

            return this;
        }
コード例 #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;
        }
コード例 #52
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            EntityID = reader.ReadVarInt();
            Title = reader.ReadString();
            Location = Position.FromReaderLong(reader);
            Direction = reader.ReadInt();

            return this;
        }
コード例 #53
0
        public IPacketWithSize ReadPacket(IMinecraftDataReader reader)
        {
            TextureURL = reader.ReadString();
            SideBlock = reader.ReadByte();
            EdgeBlock = reader.ReadByte();
            SideLevel = reader.ReadShort();

            return this;
        }
コード例 #54
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Dimension  = (Dimension)reader.ReadInt();
            Difficulty = (Difficulty)reader.ReadByte();
            GameMode   = (GameMode)reader.ReadByte();
            LevelType  = reader.ReadString();

            return(this);
        }
コード例 #55
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            SoundName = reader.ReadString();
            Coordinates = Position.FromReaderInt(reader);
            Volume = reader.ReadFloat();
            Pitch = reader.ReadByte();

            return this;
        }
コード例 #56
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Channel = reader.ReadString();
            int length = reader.ReadShort();

            Data = reader.ReadByteArray(length);

            return(this);
        }
コード例 #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;
        }
コード例 #58
0
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            Locale = reader.ReadString();
            ViewDistance = reader.ReadByte();
            ChatFlags = (ChatFlags) reader.ReadByte();
            ChatColours = reader.ReadBoolean();
            DisplayedSkinParts = DisplayedSkinParts.FromReader(reader);

            return this;
        }
コード例 #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;
        }
コード例 #60
0
        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;
        }