Example #1
0
 public BiomeCacheBlock getBiomeCacheBlock(int i, int j)
 {
     i >>= 4;
     j >>= 4;
     long l = (long)i & 0xffffffffL | ((long)j & 0xffffffffL) << 32;
     BiomeCacheBlock biomecacheblock = (BiomeCacheBlock)cacheMap.getValueByKey(l);
     if (biomecacheblock == null)
     {
         biomecacheblock = new BiomeCacheBlock(this, i, j);
         cacheMap.add(l, biomecacheblock);
         cache.Add(biomecacheblock);
     }
     biomecacheblock.lastAccessTime = Convert.ToInt64(((TimeSpan)(DateTime.UtcNow - new DateTime(1970, 1, 1))).TotalMilliseconds);
     return biomecacheblock;
 }
Example #2
0
        public BiomeCacheBlock getBiomeCacheBlock(int i, int j)
        {
            i >>= 4;
            j >>= 4;
            long            l = (long)i & 0xffffffffL | ((long)j & 0xffffffffL) << 32;
            BiomeCacheBlock biomecacheblock = (BiomeCacheBlock)cacheMap.getValueByKey(l);

            if (biomecacheblock == null)
            {
                biomecacheblock = new BiomeCacheBlock(this, i, j);
                cacheMap.add(l, biomecacheblock);
                cache.Add(biomecacheblock);
            }
            biomecacheblock.lastAccessTime = Convert.ToInt64(((TimeSpan)(DateTime.UtcNow - new DateTime(1970, 1, 1))).TotalMilliseconds);
            return(biomecacheblock);
        }