示例#1
0
 public final int getSmoothWaterColorMultiplier() {
   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? */
       return bm.getWaterColorMult();
     }
     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 mult = bm.getWaterColorMult();
         raccum += (mult >> 16) & 0xFF;
         gaccum += (mult >> 8) & 0xFF;
         baccum += mult & 0xFF;
       }
     }
     return ((raccum / 9) << 16) | ((gaccum / 9) << 8) | (baccum / 9);
   } catch (Exception x) {
     exceptions++;
     return 0xFFFFFF;
   }
 }
 public int getSmoothWaterColorMultiplier() {
   // TODO Auto-generated method stub
   BiomeMap bm = getBiome();
   return bm.getWaterColorMult();
 }