Example #1
0
        public async Task ReadAsync(MinecraftStream stream)
        {
            this.WindowId = await stream.ReadByteAsync();

            this.ActionNumber = await stream.ReadShortAsync();

            this.Accepted = await stream.ReadBooleanAsync();
        }
Example #2
0
        public async void DeserializeAsync(bool input, byte @byte)
        {
            using var stream = new MinecraftStream(new[] { @byte });

            bool boolean = await stream.ReadBooleanAsync();

            Assert.Equal(input, boolean);
        }
Example #3
0
        public async Task ReadAsync(MinecraftStream stream)
        {
            this.WindowId = await stream.ReadByteAsync();

            this.RecipeId = await stream.ReadStringAsync();

            this.MakeAll = await stream.ReadBooleanAsync();
        }
Example #4
0
        public async Task ReadAsync(MinecraftStream stream)
        {
            this.Position = await stream.ReadAbsolutePositionFAsync();

            this.Pitch = await stream.ReadFloatAsync();

            this.Yaw = await stream.ReadFloatAsync();

            this.OnGround = await stream.ReadBooleanAsync();
        }
Example #5
0
        public override async Task PopulateAsync()
        {
            using (var stream = new MinecraftStream(this.PacketData))
            {
                this.Yaw = await stream.ReadFloatAsync();

                this.Pitch = await stream.ReadFloatAsync();

                this.OnGround = await stream.ReadBooleanAsync();
            }
        }
Example #6
0
 public override async Task PopulateAsync()
 {
     using (var stream = new MinecraftStream(this.PacketData))
     {
         this.Position = new Position
         {
             X = await stream.ReadDoubleAsync(),
             Y = await stream.ReadDoubleAsync(),
             Z = await stream.ReadDoubleAsync()
         };
         this.OnGround = await stream.ReadBooleanAsync();
     }
 }
Example #7
0
        public async Task ReadAsync(MinecraftStream stream)
        {
            this.Locale = await stream.ReadStringAsync();

            this.ViewDistance = await stream.ReadByteAsync();

            this.ChatMode = await stream.ReadVarIntAsync();

            this.ChatColors = await stream.ReadBooleanAsync();

            this.SkinParts = await stream.ReadUnsignedByteAsync();

            this.MainHand = await stream.ReadVarIntAsync();
        }
Example #8
0
        public async Task ReadAsync(MinecraftStream stream)
        {
            this.Hand = (Hand)await stream.ReadVarIntAsync();

            this.Location = await stream.ReadPositionAsync();

            this.Face = (BlockFace)await stream.ReadVarIntAsync();

            this.CursorX = await stream.ReadFloatAsync();

            this.CursorY = await stream.ReadFloatAsync();

            this.CursorZ = await stream.ReadFloatAsync();

            this.InsideBlock = await stream.ReadBooleanAsync();
        }
Example #9
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();
            }
        }
Example #10
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();
            }
        }