当前位置: 首页>>代码示例>>Java>>正文


Java ColorizerFoliage.getFoliageColorPine方法代码示例

本文整理汇总了Java中net.minecraft.world.ColorizerFoliage.getFoliageColorPine方法的典型用法代码示例。如果您正苦于以下问题:Java ColorizerFoliage.getFoliageColorPine方法的具体用法?Java ColorizerFoliage.getFoliageColorPine怎么用?Java ColorizerFoliage.getFoliageColorPine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.world.ColorizerFoliage的用法示例。


在下文中一共展示了ColorizerFoliage.getFoliageColorPine方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: colorMultiplier

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
public int colorMultiplier(IBlockAccess worldIn, BlockPos pos, int renderPass)
{
    IBlockState iblockstate = worldIn.getBlockState(pos);

    if (iblockstate.getBlock() == this)
    {
        BlockPlanks.EnumType blockplanks$enumtype = (BlockPlanks.EnumType)iblockstate.getValue(VARIANT);

        if (blockplanks$enumtype == BlockPlanks.EnumType.SPRUCE)
        {
            return ColorizerFoliage.getFoliageColorPine();
        }

        if (blockplanks$enumtype == BlockPlanks.EnumType.BIRCH)
        {
            return ColorizerFoliage.getFoliageColorBirch();
        }
    }

    return super.colorMultiplier(worldIn, pos, renderPass);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:22,代码来源:BlockOldLeaf.java

示例2: getRenderColor

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
public int getRenderColor(IBlockState state)
{
    if (state.getBlock() != this)
    {
        return super.getRenderColor(state);
    }
    else
    {
        BlockPlanks.EnumType blockplanks$enumtype = (BlockPlanks.EnumType)state.getValue(VARIANT);
        return blockplanks$enumtype == BlockPlanks.EnumType.SPRUCE ? ColorizerFoliage.getFoliageColorPine() : (blockplanks$enumtype == BlockPlanks.EnumType.BIRCH ? ColorizerFoliage.getFoliageColorBirch() : super.getRenderColor(state));
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:13,代码来源:BlockOldLeaf.java

示例3: getRenderColor

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public int getRenderColor(IBlockState state)
{
    switch (variant)
    {
        case BIRCH:
            return ColorizerFoliage.getFoliageColorBirch();
        case SPRUCE:
            return ColorizerFoliage.getFoliageColorPine();
    }
    return ColorizerFoliage.getFoliageColorBasic();
}
 
开发者ID:gigaherz,项目名称:NaturalTrees,代码行数:13,代码来源:BlockBranch.java

示例4: colorMultiplier

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
@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 world, int x, int y, int z)
    {
        int l = world.getBlockMetadata(x, y, z);

        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 = world.getBiomeGenForCoords(x + i2, z + 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;
        }
    }
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:39,代码来源:BlockLeavesMF.java

示例5: colorMultiplier

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
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;
    }
}
 
开发者ID:Unrelentless,项目名称:FantasyCraft-Mod,代码行数:33,代码来源:BlockFCraftLeaves.java

示例6: getRenderColor

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
@Override
@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());
}
 
开发者ID:jaredlll08,项目名称:MysticalTrinkets,代码行数:9,代码来源:BlockInfusedOakLeaves.java

示例7: colorMultiplier

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
@Override
@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(j1, l1, i1);
				i1 += (j2 & 16711680) >> 16;
				j1 += (j2 & 65280) >> 8;
				k1 += j2 & 255;
			}
		}

		return (i1 / 9 & 255) << 16 | (j1 / 9 & 255) << 8 | k1 / 9 & 255;
	}
}
 
开发者ID:jaredlll08,项目名称:MysticalTrinkets,代码行数:31,代码来源:BlockInfusedOakLeaves.java

示例8: getRenderColor

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
@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());
    }
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:10,代码来源:BlockLeaves.java

示例9: colorMultiplier

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
@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;
        }
    }
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:39,代码来源:BlockLeaves.java

示例10: colorMultiplier

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
@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 var5 = par1IBlockAccess.getBlockMetadata(par2, par3, par4);

    if ((var5 & 3) == 1) {
        return ColorizerFoliage.getFoliageColorPine();
    } else if ((var5 & 3) == 2) {
        return ColorizerFoliage.getFoliageColorBirch();
    } else {
        int var6 = 0;
        int var7 = 0;
        int var8 = 0;

        for (int var9 = -1; var9 <= 1; ++var9) {
            for (int var10 = -1; var10 <= 1; ++var10) {
                int var11 = par1IBlockAccess.getBiomeGenForCoords(par2 + var10, par4 + var9).getBiomeFoliageColor();
                var6 += (var11 & 16711680) >> 16;
                var7 += (var11 & 65280) >> 8;
                var8 += var11 & 255;
            }
        }

        return (var6 / 9 & 255) << 16 | (var7 / 9 & 255) << 8 | var8 / 9 & 255;
    }
}
 
开发者ID:Grimlock257,项目名称:JaffaCakes,代码行数:28,代码来源:OrangeTreeLeaves.java

示例11: getRenderColor

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
@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());
}
 
开发者ID:Danis98,项目名称:Veniocraft,代码行数:8,代码来源:BlockVenioLeaves.java

示例12: colorMultiplier

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
@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;
		}
}
 
开发者ID:Danis98,项目名称:Veniocraft,代码行数:33,代码来源:BlockVenioLeaves.java

示例13: getColor

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
public int getColor(IBlockAccess p_getColor_1_, BlockPos p_getColor_2_)
{
    return CustomColors.foliagePineColors != null ? CustomColors.foliagePineColors.getColor(p_getColor_1_, p_getColor_2_) : ColorizerFoliage.getFoliageColorPine();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:5,代码来源:CustomColors.java

示例14: getSmoothColorMultiplier

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
private static int getSmoothColorMultiplier(Block p_getSmoothColorMultiplier_0_, IBlockAccess p_getSmoothColorMultiplier_1_, BlockPos p_getSmoothColorMultiplier_2_, int[] p_getSmoothColorMultiplier_3_, int[] p_getSmoothColorMultiplier_4_, int p_getSmoothColorMultiplier_5_, int p_getSmoothColorMultiplier_6_, RenderEnv p_getSmoothColorMultiplier_7_)
{
    int i = 0;
    int j = 0;
    int k = 0;
    int l = p_getSmoothColorMultiplier_2_.getX();
    int i1 = p_getSmoothColorMultiplier_2_.getY();
    int j1 = p_getSmoothColorMultiplier_2_.getZ();
    BlockPosM blockposm = p_getSmoothColorMultiplier_7_.getColorizerBlockPosM();

    for (int k1 = l - 1; k1 <= l + 1; ++k1)
    {
        for (int l1 = j1 - 1; l1 <= j1 + 1; ++l1)
        {
            blockposm.setXyz(k1, i1, l1);
            int[] aint = p_getSmoothColorMultiplier_3_;

            if (p_getSmoothColorMultiplier_4_ != p_getSmoothColorMultiplier_3_ && p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm) == BiomeGenBase.swampland)
            {
                aint = p_getSmoothColorMultiplier_4_;
            }

            int i2 = 0;

            if (aint == null)
            {
                switch (p_getSmoothColorMultiplier_5_)
                {
                    case 1:
                        i2 = p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm).getGrassColorAtPos(blockposm);
                        break;

                    case 2:
                        if ((p_getSmoothColorMultiplier_6_ & 3) == 1)
                        {
                            i2 = ColorizerFoliage.getFoliageColorPine();
                        }
                        else if ((p_getSmoothColorMultiplier_6_ & 3) == 2)
                        {
                            i2 = ColorizerFoliage.getFoliageColorBirch();
                        }
                        else
                        {
                            i2 = p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm).getFoliageColorAtPos(blockposm);
                        }

                        break;

                    default:
                        i2 = p_getSmoothColorMultiplier_0_.colorMultiplier(p_getSmoothColorMultiplier_1_, blockposm);
                }
            }
            else
            {
                i2 = getCustomColor(aint, p_getSmoothColorMultiplier_1_, blockposm);
            }

            i += i2 >> 16 & 255;
            j += i2 >> 8 & 255;
            k += i2 & 255;
        }
    }

    int j2 = i / 9;
    int k2 = j / 9;
    int l2 = k / 9;
    return j2 << 16 | k2 << 8 | l2;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:69,代码来源:CustomColorizer.java

示例15: getSmoothColorMultiplier

import net.minecraft.world.ColorizerFoliage; //导入方法依赖的package包/类
private static int getSmoothColorMultiplier(Block p_getSmoothColorMultiplier_0_, IBlockAccess p_getSmoothColorMultiplier_1_, BlockPos p_getSmoothColorMultiplier_2_, int[] p_getSmoothColorMultiplier_3_, int[] p_getSmoothColorMultiplier_4_, int p_getSmoothColorMultiplier_5_, int p_getSmoothColorMultiplier_6_, RenderEnv p_getSmoothColorMultiplier_7_)
{
    int i = 0;
    int j = 0;
    int k = 0;
    int l = p_getSmoothColorMultiplier_2_.getX();
    int i1 = p_getSmoothColorMultiplier_2_.getY();
    int j1 = p_getSmoothColorMultiplier_2_.getZ();
    BlockPosM blockposm = p_getSmoothColorMultiplier_7_.getColorizerBlockPos();

    for (int k1 = l - 1; k1 <= l + 1; ++k1)
    {
        for (int l1 = j1 - 1; l1 <= j1 + 1; ++l1)
        {
            blockposm.setXyz(k1, i1, l1);
            int[] aint = p_getSmoothColorMultiplier_3_;

            if (p_getSmoothColorMultiplier_4_ != p_getSmoothColorMultiplier_3_ && p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm) == BiomeGenBase.swampland)
            {
                aint = p_getSmoothColorMultiplier_4_;
            }

            int i2 = 0;

            if (aint == null)
            {
                switch (p_getSmoothColorMultiplier_5_)
                {
                    case 1:
                        i2 = p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm).getGrassColorAtPos(blockposm);
                        break;

                    case 2:
                        if ((p_getSmoothColorMultiplier_6_ & 3) == 1)
                        {
                            i2 = ColorizerFoliage.getFoliageColorPine();
                        }
                        else if ((p_getSmoothColorMultiplier_6_ & 3) == 2)
                        {
                            i2 = ColorizerFoliage.getFoliageColorBirch();
                        }
                        else
                        {
                            i2 = p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm).getFoliageColorAtPos(blockposm);
                        }

                        break;

                    default:
                        i2 = p_getSmoothColorMultiplier_0_.colorMultiplier(p_getSmoothColorMultiplier_1_, blockposm);
                }
            }
            else
            {
                i2 = getCustomColor(aint, p_getSmoothColorMultiplier_1_, blockposm);
            }

            i += i2 >> 16 & 255;
            j += i2 >> 8 & 255;
            k += i2 & 255;
        }
    }

    int j2 = i / 9;
    int k2 = j / 9;
    int l2 = k / 9;
    return j2 << 16 | k2 << 8 | l2;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:69,代码来源:CustomColorizer.java


注:本文中的net.minecraft.world.ColorizerFoliage.getFoliageColorPine方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。