Exemplo n.º 1
0
        } = 0;                                          // 0 = chatbox, 1 = system message, 2 = game info (actionbar)

        public override async Task PopulateAsync()
        {
            using (var stream = new MinecraftStream(this.PacketData))
            {
                this.Message  = JsonConvert.DeserializeObject <ChatMessage>(await stream.ReadStringAsync());
                this.Position = await stream.ReadUnsignedByteAsync();
            }
        }
Exemplo n.º 2
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();
            }
        }
Exemplo n.º 3
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.ReadVarIntAsync();

            this.Item = await stream.ReadSlotAsync();
        }
Exemplo n.º 4
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();
        }
Exemplo n.º 5
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.º 6
0
 public async Task ReadAsync(MinecraftStream stream)
 {
     this.WindowId = await stream.ReadUnsignedByteAsync();
 }