Esempio n. 1
0
  @SideOnly(Side.CLIENT)

  /**
   * 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) {
    int l = par1IBlockAccess.getBlockMetadata(par2, par3, par4);

    if ((l & 3) == 1) {
      return ColorizerFoliage.getFoliageColorPine();
    } else if ((l & 3) == 2) {
      return ColorizerFoliage.getFoliageColorBirch();
    } else {
      int i1 = 0;
      int j1 = 0;
      int k1 = 0;

      for (int l1 = -1; l1 <= 1; ++l1) {
        for (int i2 = -1; i2 <= 1; ++i2) {
          int j2 =
              par1IBlockAccess.getBiomeGenForCoords(par2 + i2, par4 + l1).getBiomeFoliageColor();
          i1 += (j2 & 16711680) >> 16;
          j1 += (j2 & 65280) >> 8;
          k1 += j2 & 255;
        }
      }

      return (i1 / 9 & 255) << 16 | (j1 / 9 & 255) << 8 | k1 / 9 & 255;
    }
  }
Esempio n. 2
0
 @SideOnly(Side.CLIENT)
 @Override
 public int getRenderColor(int p_149741_1_) {
   return (p_149741_1_ & 3) == 1
       ? ColorizerFoliage.getFoliageColorPine()
       : (p_149741_1_ & 3) == 2
           ? ColorizerFoliage.getFoliageColorBirch()
           : super.getRenderColor(p_149741_1_);
 }
Esempio n. 3
0
  @SideOnly(Side.CLIENT)

  /** Returns the color this block should be rendered. Used by leaves. */
  public int getRenderColor(int par1) {
    return (par1 & 3) == 1
        ? ColorizerFoliage.getFoliageColorPine()
        : ((par1 & 3) == 2
            ? ColorizerFoliage.getFoliageColorBirch()
            : ColorizerFoliage.getFoliageColorBasic());
  }
Esempio n. 4
0
  @SideOnly(Side.CLIENT)
  @Override
  public int colorMultiplier(IBlockAccess blockAccess, int x, int y, int z) {
    int meta = blockAccess.getBlockMetadata(x, y, z);

    return (meta & 3) == 1
        ? ColorizerFoliage.getFoliageColorPine()
        : (meta & 3) == 2
            ? ColorizerFoliage.getFoliageColorBirch()
            : super.colorMultiplier(blockAccess, x, y, z);
  }
 public void onResourceManagerReload(IResourceManager p_110549_1_) {
   try {
     ColorizerFoliage.setFoliageBiomeColorizer(
         TextureUtil.readImageData(p_110549_1_, field_130079_a));
   } catch (IOException var3) {;
   }
 }
 @SideOnly(Side.CLIENT)
 public int getBlockColor() {
   if (leaves) {
     double d0 = 0.5D;
     double d1 = 1.0D;
     return ColorizerFoliage.getFoliageColor(d0, d1);
   } else {
     return super.getBlockColor();
   }
 }
Esempio n. 7
0
 /** Returns the color this block should be rendered. Used by leaves. */
 public int getRenderColor(int var1) {
   return ColorizerFoliage.getFoliageColorBasic();
 }
Esempio n. 8
0
 public int getBlockColor() {
   double var1 = 0.5D;
   double var3 = 1.0D;
   return ColorizerFoliage.getFoliageColor(var1, var3);
 }
Esempio n. 9
0
 public int func_149741_i(int p_149741_1_) {
   return ColorizerFoliage.func_77468_c();
 }
Esempio n. 10
0
 public int func_149635_D() {
   double var1 = 0.5D;
   double var3 = 1.0D;
   return ColorizerFoliage.func_77470_a(var1, var3);
 }
Esempio n. 11
0
 @SideOnly(Side.CLIENT)
 public int func_76726_l() {
   double var1 = (double) this.func_76743_j();
   double var3 = (double) this.func_76727_i();
   return ((ColorizerFoliage.func_77470_a(var1, var3) & 16711422) + 5115470) / 2;
 }
Esempio n. 12
0
 /** Returns the color this block should be rendered. Used by leaves. */
 @SideOnly(Side.CLIENT)
 public int getRenderColor(int p_149741_1_) {
   return ColorizerFoliage.getFoliageColorBasic();
 }
Esempio n. 13
0
 @SideOnly(Side.CLIENT)
 public int getBlockColor() {
   double d0 = 0.5D;
   double d1 = 1.0D;
   return ColorizerFoliage.getFoliageColor(d0, d1);
 }
Esempio n. 14
0
 @Override
 @SideOnly(Side.CLIENT)
 public int getBiomeFoliageColor() {
   return ColorizerFoliage.getFoliageColor(1.0F, 1.0F);
 }
  @Override
  @SideOnly(Side.CLIENT)
  public int getRenderColor(int meta) {

    return ColorizerFoliage.getFoliageColorBasic();
  }
Esempio n. 16
0
  @SideOnly(Side.CLIENT)

  /** Returns the color this block should be rendered. Used by leaves. */
  public int getRenderColor(int par1) {
    return ColorizerFoliage.getFoliageColorBasic();
  }
Esempio n. 17
0
 public int func_180625_c(BlockPos p_180625_1_) {
   double var2 = (double) MathHelper.clamp_float(this.func_180626_a(p_180625_1_), 0.0F, 1.0F);
   double var4 = (double) MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F);
   return ColorizerFoliage.getFoliageColor(var2, var4);
 }
Esempio n. 18
0
 @SideOnly(Side.CLIENT)
 public int getBlockColor() {
   return ColorizerFoliage.getFoliageColorBasic();
 }