Пример #1
0
        public Packet51MapChunk(int i, int j, int k, int l, int i1, int j1, World world)
        {
            isChunkDataPacket = true;
            xPosition         = i;
            yPosition         = j;
            zPosition         = k;
            xSize             = l;
            ySize             = i1;
            zSize             = j1;
            byte[] abyte0   = world.getChunkData(i, j, k, l, i1, j1);
            var    deflater = new Deflater(1);

            try
            {
                deflater.setInput(abyte0);
                deflater.finish();
                chunk     = new byte[(l * i1 * j1 * 5) / 2];
                chunkSize = deflater.deflate(chunk);
            }
            finally
            {
                deflater.end();
            }
        }