/// <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); }
public override int GetBlockColor() { double d = 0.5D; double d1 = 1.0D; return(ColorizerFoliage.GetFoliageColor(d, d1)); }
/// <summary> /// Provides the basic foliage color based on the biome temperature and rainfall /// </summary> public override int GetBiomeFoliageColor() { double d = GetFloatTemperature(); double d1 = GetFloatRainfall(); return(((ColorizerFoliage.GetFoliageColor(d, d1) & 0xfefefe) + 0x4e0e4e) / 2); }
/// <summary> /// Provides the basic foliage color based on the biome temperature and rainfall /// </summary> public virtual int GetBiomeFoliageColor() { double d = MathHelper2.Clamp_float(GetFloatTemperature(), 0.0F, 1.0F); double d1 = MathHelper2.Clamp_float(GetFloatRainfall(), 0.0F, 1.0F); return(ColorizerFoliage.GetFoliageColor(d, d1)); }
/// <summary> /// Returns the color this block should be rendered. Used by leaves. /// </summary> public override int GetRenderColor(int par1) { if (par1 == 0) { return(0xffffff); } else { return(ColorizerFoliage.GetFoliageColorBasic()); } }
/// <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()); } }
/// <summary> /// Returns the color this block should be rendered. Used by leaves. /// </summary> public override int GetRenderColor(int par1) { return(ColorizerFoliage.GetFoliageColorBasic()); }
public override int GetBlockColor() { return(ColorizerFoliage.GetFoliageColorBasic()); }