コード例 #1
0
ファイル: Packets.cs プロジェクト: pollyzoid/mclib
        public override void Read(NetworkStreamMC stream)
        {
            X = stream.Int32();
            Y = stream.Int16();
            Z = stream.Int32();

            SizeX = stream.Byte();
            SizeY = stream.Byte();
            SizeZ = stream.Byte();

            Data = stream.Bytes(stream.Int32());
        }
コード例 #2
0
ファイル: Packets.cs プロジェクト: pollyzoid/mclib
        public override void Read(NetworkStreamMC stream)
        {
            Type = stream.Byte();
            Count = stream.Int16();

            Items = new Item[Count];

            for (int i = 0; i < Count; ++i)
            {
                var id = (Enums.Item)stream.Int16();
                if (id == Enums.Item.Invalid)
                    Items[i] = new Item { Id = id, Count = 0, Health = 0 };
                else
                    Items[i] = new Item { Id = id, Count = stream.Byte(), Health = stream.Int16() };
            }
        }
コード例 #3
0
ファイル: Packets.cs プロジェクト: pollyzoid/mclib
        public override void Read(NetworkStreamMC stream)
        {
            InvId = stream.Byte();
            SlotId = stream.Int16();
            ItemId = stream.Int16();

            if (ItemId == -1) return;
            ItemCount = stream.Byte();
            ItemHealth = stream.Byte();
        }
コード例 #4
0
ファイル: Packets.cs プロジェクト: pollyzoid/mclib
        public override void Read(NetworkStreamMC stream)
        {
            X = stream.Int32();
            Y = stream.Byte();
            Z = stream.Int32();

            Direction = stream.Byte();

            ItemId = stream.Int16();

            if (ItemId == -1) return;
            ItemAmount = stream.Byte();
            ItemHealth = stream.Byte();
        }