Exemplo n.º 1
0
        public async Task ReadAsync(MinecraftStream stream)
        {
            this.WindowId = await stream.ReadUnsignedByteAsync();

            this.ClickedSlot = await stream.ReadShortAsync();

            this.Button = await stream.ReadByteAsync();

            this.ActionNumber = await stream.ReadShortAsync();

            this.Mode = (InventoryOperationMode)await stream.ReadIntAsync();

            this.Item = await stream.ReadSlotAsync();
        }
Exemplo n.º 2
0
        public override async Task PopulateAsync()
        {
            using (var stream = new MinecraftStream(this.PacketData))
            {
                Locale = await stream.ReadStringAsync();

                ViewDistance = await stream.ReadByteAsync();

                ChatMode = await stream.ReadIntAsync();

                ChatColors = await stream.ReadBooleanAsync();

                SkinParts = await stream.ReadUnsignedByteAsync();

                MainHand = await stream.ReadVarIntAsync();
            }
        }
Exemplo n.º 3
0
        public override async Task PopulateAsync()
        {
            using (var stream = new MinecraftStream(this.PacketData))
            {
                this.EntityId = await stream.ReadVarIntAsync();

                this.GameMode = (Gamemode)await stream.ReadUnsignedByteAsync();

                this.Dimension = (Dimension)await stream.ReadIntAsync();

                this.Difficulty = (Difficulty)await stream.ReadUnsignedByteAsync();

                this.MaxPlayers = await stream.ReadUnsignedByteAsync();

                this.LevelType = await stream.ReadStringAsync();

                this.ReducedDebugInfo = await stream.ReadBooleanAsync();
            }
        }