Exemple #1
0
        protected override void OnAfterRead(Network.Client client)
        {
            if (_blockID < 0 || client.TheWorld.UpdateBlock(_x, _y, _z, (WorldGeneration.World.BlockTypes)_blockID) == false)
            {
                return;
            }
            BlockChangePacket bcp = new BlockChangePacket();

            bcp.X         = _x;
            bcp.Y         = _y;
            bcp.Z         = _z;
            bcp.BlockID   = (byte)_blockID;
            bcp.BlockMeta = 0x00;
            client.AddBroadCast(bcp, client);
        }
        protected override void OnAfterRead(Network.Client client)
        {
            byte newID = 0x00;

            if ((Status != 2 && client.PlayerMetadata.GameMode != 1) || client.TheWorld.UpdateBlock(X, Y, Z, (WorldGeneration.World.BlockTypes)newID) == false)
            {
                return;
            }
            BlockChangePacket bcp = new BlockChangePacket();

            bcp.X         = X;
            bcp.Y         = Y;
            bcp.Z         = Z;
            bcp.BlockID   = newID;
            bcp.BlockMeta = 0x00;
            client.AddBroadCast(bcp, client);
        }