protected override void OnRead(Server.Core.Stream.ByteBuffer buffer)
        {
            Status = (byte)buffer.ReadByte();
            X      = buffer.ReadInt();
            Y      = (byte)buffer.ReadByte();
            Z      = buffer.ReadInt();
            Face   = (byte)buffer.ReadByte();

            MinecraftServer.Core.Network.Server.ViewModel.Warning("Player Dig : Status = " + Status + ", Block(" + X + ", " + Y + ", " + Z + "), Face = " + Face);
        }
Ejemplo n.º 2
0
        protected override void OnRead(Server.Core.Stream.ByteBuffer buffer)
        {
            _x         = buffer.ReadInt();
            _y         = (byte)buffer.ReadByte();
            _z         = buffer.ReadInt();
            _direction = (byte)buffer.ReadByte();

            if (_direction == 0)
            {
                _y--;
            }
            else if (_direction == 1)
            {
                _y++;
            }
            else if (_direction == 2)
            {
                _z--;
            }
            else if (_direction == 3)
            {
                _z++;
            }
            else if (_direction == 4)
            {
                _x--;
            }
            else if (_direction == 5)
            {
                _x++;
            }

            _blockID = buffer.ReadShort();
            if (_blockID < 0)
            {
                return;
            }
            MinecraftServer.Core.Network.Server.ViewModel.Warning("Block Placement Coord(" + _x + ", " + _y + ", " + _z + ")");
            _itemCount  = (byte)buffer.ReadByte();
            _itemDamage = buffer.ReadShort();
            _NBTLength  = buffer.ReadShort();
        }
Ejemplo n.º 3
0
 protected override void OnAfterWrite(Network.Client client, Server.Core.Stream.ByteBuffer buffer)
 {
 }
Ejemplo n.º 4
0
 protected override void OnWrite(System.Net.Sockets.NetworkStream stream, Server.Core.Stream.ByteBuffer buffer)
 {
 }
Ejemplo n.º 5
0
 protected override void OnRead(Server.Core.Stream.ByteBuffer stream)
 {
     ActionID = (byte)stream.ReadByte();
 }
 protected override void OnRead(Server.Core.Stream.ByteBuffer stream)
 {
     stream.ReadShort();
 }
Ejemplo n.º 7
0
 protected override void OnRead(Server.Core.Stream.ByteBuffer stream)
 {
     stream.ReadByte();
     stream.ReadFloat();
     stream.ReadFloat();
 }
Ejemplo n.º 8
0
 protected override void OnRead(Server.Core.Stream.ByteBuffer stream)
 {
     WindowId = (byte)stream.ReadByte();
 }
 protected override void OnRead(Server.Core.Stream.ByteBuffer stream)
 {
     Slot = stream.ReadShort();
     ClickedItem.Read(stream);
 }