Esempio n. 1
0
        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());
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        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() };
            }
        }
Esempio n. 5
0
        public override void Read(NetworkStreamMC stream)
        {
            X = stream.Int32();
            Z = stream.Int32();

            Size = stream.Int16();

            Coordinates = new short[Size];

            for (short i = 0; i < Size; ++i)
            {
                Coordinates[i] = stream.Int16();
            }

            Types = stream.Bytes(Size);
            Metadata = stream.Bytes(Size);
        }