/// <summary> /// Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called /// when first determining what to render. /// </summary> public override int ColorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { int i = par1IBlockAccess.GetBlockMetadata(par2, par3, par4); if ((i & 3) == 1) { return(ColorizerFoliage.GetFoliageColorPine()); } if ((i & 3) == 2) { return(ColorizerFoliage.GetFoliageColorBirch()); } int j = 0; int k = 0; int l = 0; for (int i1 = -1; i1 <= 1; i1++) { for (int j1 = -1; j1 <= 1; j1++) { int k1 = par1IBlockAccess.GetBiomeGenForCoords(par2 + j1, par4 + i1).GetBiomeFoliageColor(); j += (k1 & 0xff0000) >> 16; k += (k1 & 0xff00) >> 8; l += k1 & 0xff; } } return((j / 9 & 0xff) << 16 | (k / 9 & 0xff) << 8 | l / 9 & 0xff); }
/// <summary> /// Returns the color this block should be rendered. Used by leaves. /// </summary> public override int GetRenderColor(int par1) { if ((par1 & 3) == 1) { return(ColorizerFoliage.GetFoliageColorPine()); } if ((par1 & 3) == 2) { return(ColorizerFoliage.GetFoliageColorBirch()); } else { return(ColorizerFoliage.GetFoliageColorBasic()); } }