Ejemplo n.º 1
0
  /**
   * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color.
   * Note only called when first determining what to render.
   */
  public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
    if (this.blockMaterial != Material.water) {
      return 16777215;
    } else {
      int var5 = 0;
      int var6 = 0;
      int var7 = 0;

      for (int var8 = -1; var8 <= 1; ++var8) {
        for (int var9 = -1; var9 <= 1; ++var9) {
          // MCPatcher Start
          int var10 = Colorizer.colorizeWater(par1IBlockAccess, par2 + var9, par4 + var8);
          // MCPatcher End
          var5 += (var10 & 16711680) >> 16;
          var6 += (var10 & 65280) >> 8;
          var7 += var10 & 255;
        }
      }

      return (var5 / 9 & 255) << 16 | (var6 / 9 & 255) << 8 | var7 / 9 & 255;
    }
  }