コード例 #1
0
ファイル: NewMapChunkCache.java プロジェクト: Kademlia/dynmap
 public final int getSmoothWaterColorMultiplier(int[] colormap, int width) {
   int mult = 0xFFFFFF;
   try {
     int rx = x - x_base;
     int rz = z - z_base;
     BiomeMap bm = biomemap[rx][rz];
     if (sameneighborbiomecnt[rx][rz] >= (byte) 8) {
         /* All neighbors same? */
       mult = colormap[bm.biomeLookup(width)];
     } else {
       int raccum = 0;
       int gaccum = 0;
       int baccum = 0;
       for (int xoff = -1; xoff < 2; xoff++) {
         for (int zoff = -1; zoff < 2; zoff++) {
           bm = biomemap[rx + xoff][rz + zoff];
           int rmult = colormap[bm.biomeLookup(width)];
           raccum += (rmult >> 16) & 0xFF;
           gaccum += (rmult >> 8) & 0xFF;
           baccum += rmult & 0xFF;
         }
       }
       mult = ((raccum / 9) << 16) | ((gaccum / 9) << 8) | (baccum / 9);
     }
   } catch (Exception x) {
     exceptions++;
     mult = 0xFFFFFF;
   }
   return mult;
 }
コード例 #2
0
 public int getSmoothWaterColorMultiplier(int[] colormap, int width) {
   // TODO Auto-generated method stub
   BiomeMap bm = getBiome();
   return colormap[bm.biomeLookup(width)];
 }
コード例 #3
0
 public int getSmoothColorMultiplier(int[] colormap, int width, int[] swampmap, int swampwidth) {
   // TODO Auto-generated method stub
   BiomeMap bm = getBiome();
   if (bm == BiomeMap.SWAMPLAND) return swampmap[bm.biomeLookup(swampwidth)];
   else return colormap[bm.biomeLookup(width)];
 }
コード例 #4
0
 public int getSmoothFoliageColorMultiplier(int[] colormap, int width) {
   // TODO Auto-generated method stub
   BiomeMap bm = getBiome();
   return bm.getModifiedFoliageMultiplier(colormap[bm.biomeLookup(width)]);
 }
コード例 #5
0
 public int getSmoothGrassColorMultiplier(int[] colormap, int width) {
   // TODO
   BiomeMap bm = getBiome();
   return bm.getModifiedGrassMultiplier(colormap[bm.biomeLookup(width)]);
 }