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


Java EntityRenderer.anaglyphEnable方法代码示例

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


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

示例1: renderQuads

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
public static void renderQuads(VertexBuffer renderer, List<BakedQuad> quads, int color, ItemStack stack) {
	boolean flag = (color == -1) && (!stack.isEmpty());
	int i = 0;
	for (int j = quads.size(); i < j; i++) {
		BakedQuad bakedquad = quads.get(i);
		int k = color;
		if ((flag) && (bakedquad.hasTintIndex())) {
			ItemColors itemColors = Minecraft.getMinecraft().getItemColors();
			k = itemColors.getColorFromItemstack(stack, bakedquad.getTintIndex());
			if (EntityRenderer.anaglyphEnable) {
				k = TextureUtil.anaglyphColor(k);
			}
			k |= 0xFF000000;
		}
		LightUtil.renderQuadColor(renderer, bakedquad, k);
	}
}
 
开发者ID:p455w0rd,项目名称:DankNull,代码行数:18,代码来源:RenderModel.java

示例2: renderQuads

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
private void renderQuads(WorldRenderer renderer, List<BakedQuad> quads, int color, ItemStack stack)
{
    boolean flag = color == -1 && stack != null;
    int i = 0;

    for (int j = quads.size(); i < j; ++i)
    {
        BakedQuad bakedquad = (BakedQuad)quads.get(i);
        int k = color;

        if (flag && bakedquad.hasTintIndex())
        {
            k = stack.getItem().getColorFromItemStack(stack, bakedquad.getTintIndex());

            if (EntityRenderer.anaglyphEnable)
            {
                k = TextureUtil.anaglyphColor(k);
            }

            k = k | -16777216;
        }

        this.renderQuad(renderer, bakedquad, k);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:26,代码来源:RenderItem.java

示例3: setBrightness

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
private int setBrightness(Tessellator tessellator, IBlockAccess blockAccess, int x, int y, int z, Block block) {
	int mb = block.getMixedBrightnessForBlock(blockAccess, x, y, z);
	tessellator.setBrightness(mb);

	float f = 1.0F;

	int l = block.colorMultiplier(blockAccess, x, y, z);
	float f1 = (l >> 16 & 0xFF) / 255.0F;
	float f2 = (l >> 8 & 0xFF) / 255.0F;
	float f3 = (l & 0xFF) / 255.0F;
	if (EntityRenderer.anaglyphEnable) {
		float f6 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F;
		float f4 = (f1 * 30.0F + f2 * 70.0F) / 100.0F;
		float f7 = (f1 * 30.0F + f3 * 70.0F) / 100.0F;
		f1 = f6;
		f2 = f4;
		f3 = f7;
	}
	tessellator.setColorOpaque_F(f * f1, f * f2, f * f3);
	return mb;
}
 
开发者ID:MJaroslav,项目名称:ThaumOres,代码行数:22,代码来源:TileInfusedBlockOreRenderer.java

示例4: renderStandardBlock

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
public boolean renderStandardBlock(final Block p_147784_1_, final int p_147784_2_, final int p_147784_3_, final int p_147784_4_) {
    final int l = p_147784_1_.colorMultiplier(this.blockAccess, p_147784_2_, p_147784_3_, p_147784_4_);
    float f = (l >> 16 & 0xFF) / 255.0f;
    float f2 = (l >> 8 & 0xFF) / 255.0f;
    float f3 = (l & 0xFF) / 255.0f;
    if (EntityRenderer.anaglyphEnable) {
        final float f4 = (f * 30.0f + f2 * 59.0f + f3 * 11.0f) / 100.0f;
        final float f5 = (f * 30.0f + f2 * 70.0f) / 100.0f;
        final float f6 = (f * 30.0f + f3 * 70.0f) / 100.0f;
        f = f4;
        f2 = f5;
        f3 = f6;
    }
    f *= 0.75f;
    f2 *= 0.75f;
    f3 *= 0.75f;
    return this.renderStandardBlockWithColorMultiplier(p_147784_1_, p_147784_2_, p_147784_3_, p_147784_4_, f, f2, f3);
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:19,代码来源:FakeRenderEtherealBlocks.java

示例5: renderWorldBlock

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
public boolean renderWorldBlock(final IBlockAccess world, final int par2, final int par3, final int par4, final Block par1Block, final int modelId, final RenderBlocks renderer) {
    final Tessellator var8 = Tessellator.instance;
    final int i = world.getBlockMetadata(par2, par3, par4);
    float f = BlockColor.initColor[i][0];
    float f2 = BlockColor.initColor[i][1];
    float f3 = BlockColor.initColor[i][2];
    final TileEntity data = world.getTileEntity(BlockColorData.dataBlockX(par2), BlockColorData.dataBlockY(par3), BlockColorData.dataBlockZ(par4));
    if (data instanceof TileEntityBlockColorData) {
        f = ((TileEntityBlockColorData)data).palette[i][0];
        f2 = ((TileEntityBlockColorData)data).palette[i][1];
        f3 = ((TileEntityBlockColorData)data).palette[i][2];
    }
    if (EntityRenderer.anaglyphEnable) {
        final float f4 = (f * 30.0f + f2 * 59.0f + f3 * 11.0f) / 100.0f;
        final float f5 = (f * 30.0f + f2 * 70.0f) / 100.0f;
        final float f6 = (f * 30.0f + f3 * 70.0f) / 100.0f;
        f = f4;
        f2 = f5;
        f3 = f6;
    }
    return (Minecraft.isAmbientOcclusionEnabled() && par1Block.getLightValue() == 0) ? renderer.renderStandardBlockWithAmbientOcclusion(par1Block, par2, par3, par4, f, f2, f3) : renderer.renderStandardBlockWithColorMultiplier(par1Block, par2, par3, par4, f, f2, f3);
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:23,代码来源:RenderBlockColor.java

示例6: renderBlockMeteor

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
public void renderBlockMeteor(RenderBlocks renderBlocks, Block par1Block, IBlockAccess var1, int par2, int par3, int par4)
{
    Tessellator tessellator = Tessellator.instance;
    tessellator.setBrightness(par1Block.getMixedBrightnessForBlock(var1, par2, par3, par4));
    float f = 1.0F;
    int l = par1Block.colorMultiplier(var1, par2, par3, par4);
    float f1 = (l >> 16 & 255) / 255.0F;
    float f2 = (l >> 8 & 255) / 255.0F;
    float f3 = (l & 255) / 255.0F;

    if (EntityRenderer.anaglyphEnable)
    {
        float f4 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F;
        float f5 = (f1 * 30.0F + f2 * 70.0F) / 100.0F;
        float f6 = (f1 * 30.0F + f3 * 70.0F) / 100.0F;
        f1 = f4;
        f2 = f5;
        f3 = f6;
    }

    tessellator.setColorOpaque_F(f * f1, f * f2, f * f3);

    renderBlocks.drawCrossedSquares(par1Block.getIcon(0, var1.getBlockMetadata(par2, par3, par4)), par2, par3, par4, 1.0F);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:25,代码来源:BlockRendererCavernousVines.java

示例7: RenderHelper_a

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
private void RenderHelper_a(BufferBuilder p_175032_1_, List p_175032_2_, int p_175032_3_, ItemStack p_175032_4_) {
	boolean flag = p_175032_3_ == -1 && p_175032_4_ != null;
	BakedQuad bakedquad;
	int j;

	for (Iterator iterator = p_175032_2_.iterator(); iterator.hasNext(); this.RenderHelper_B(p_175032_1_, bakedquad, j)) {
		bakedquad = (BakedQuad) iterator.next();
		j = p_175032_3_;

		if (flag && bakedquad.hasTintIndex()) {
			// j = p_175032_4_.getItem().getColorFromItemStack(p_175032_4_, bakedquad.getTintIndex());

			if (EntityRenderer.anaglyphEnable) {
				j = TextureUtil.anaglyphColor(j);
			}

			j |= -16777216;
		}
	}
}
 
开发者ID:TechStack,项目名称:TechStack-s-HeavyMachineryMod,代码行数:21,代码来源:TileEntityCrateRenderer.java

示例8: getBrightness

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
public int getBrightness(IBlockAccess blockAccess, int x, int y, int z, Block block)
{
    int mb = block.getMixedBrightnessForBlock(blockAccess, x, y, z);
    tessellator.setBrightness(mb);
    float f = 1.0F;
    int l = block.colorMultiplier(blockAccess, x, y, z);
    float f1 = (float) (l >> 16 & 255) / 255.0F;
    float f2 = (float) (l >> 8 & 255) / 255.0F;
    float f3 = (float) (l & 255) / 255.0F;
    if (EntityRenderer.anaglyphEnable)
    {
        float f6 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F;
        float f4 = (f1 * 30.0F + f2 * 70.0F) / 100.0F;
        float f7 = (f1 * 30.0F + f3 * 70.0F) / 100.0F;
        f1 = f6;
        f2 = f4;
        f3 = f7;
    }

    tessellator.setColorOpaque_F(f * f1, f * f2, f * f3);
    return mb;
}
 
开发者ID:Thog,项目名称:ThaumicThings,代码行数:23,代码来源:BlockRenderingHandler.java

示例9: setItemShading

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
public void setItemShading()
{
	Tessellator tessellator = Tessellator.instance;
	int color = block.colorMultiplier(renderer.blockAccess, x, y, z);
       float red = (float)(color >> 16 & 255) / 255.0F;
       float green = (float)(color >> 8 & 255) / 255.0F;
       float blue = (float)(color & 255) / 255.0F;

       if (EntityRenderer.anaglyphEnable)
       {
           float redAna = (red * 30.0F + green * 59.0F + blue * 11.0F) / 100.0F;
           float greenAna = (red * 30.0F + green * 70.0F) / 100.0F;
           float blueAna = (red * 30.0F + blue * 70.0F) / 100.0F;
           red = redAna;
           green = greenAna;
           blue = blueAna;
       }
       
       tessellator.setColorOpaque_F(red, green, blue);
   	tessellator.setBrightness(block.getMixedBrightnessForBlock(renderer.blockAccess, x, y, z));
}
 
开发者ID:StrayWolfe,项目名称:Cooking-with-TFC,代码行数:22,代码来源:CWTFCRenderer.java

示例10: setBrightness

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
private int setBrightness(IBlockAccess blockAccess, int i, int j, int k, Block block) {
    Tessellator tessellator = Tessellator.instance;
    int mb = block.getMixedBrightnessForBlock(blockAccess, i, j, k);
    tessellator.setBrightness(mb);

    float f = 1.0F;

    int l = block.colorMultiplier(blockAccess, i, j, k);
    float f1 = (l >> 16 & 0xFF) / 255.0F;
    float f2 = (l >> 8 & 0xFF) / 255.0F;
    float f3 = (l & 0xFF) / 255.0F;
    if (EntityRenderer.anaglyphEnable) {
        float f6 = (f1 * 30.0F + f2 * 59.0F + f3 * 11.0F) / 100.0F;
        float f4 = (f1 * 30.0F + f2 * 70.0F) / 100.0F;
        float f7 = (f1 * 30.0F + f3 * 70.0F) / 100.0F;
        f1 = f6;
        f2 = f4;
        f3 = f7;
    }
    tessellator.setColorOpaque_F(f * f1, f * f2, f * f3);
    return mb;
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:23,代码来源:BlockExtendedNodeJarRenderer.java

示例11: RenderHelper_a

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
private void RenderHelper_a(WorldRenderer p_175032_1_, List p_175032_2_, int p_175032_3_, ItemStack p_175032_4_)
{
    boolean flag = p_175032_3_ == -1 && p_175032_4_ != null;
    BakedQuad bakedquad;
    int j;

    for (Iterator iterator = p_175032_2_.iterator(); iterator.hasNext(); this.RenderHelper_B(p_175032_1_, bakedquad, j))
    {
        bakedquad = (BakedQuad)iterator.next();
        j = p_175032_3_;

        if (flag && bakedquad.func_178212_b())
        {
            j = p_175032_4_.getItem().getColorFromItemStack(p_175032_4_, bakedquad.func_178211_c());

            if (EntityRenderer.anaglyphEnable)
            {
                j = TextureUtil.func_177054_c(j);
            }

            j |= -16777216;
        }
    }
}
 
开发者ID:TechStack,项目名称:MachineMod,代码行数:25,代码来源:RenderDumpTruck.java

示例12: renderConveyorWorld

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
private void renderConveyorWorld(IBlockAccess world, int x, int y, int z, Block block) {
    Tessellator tessellator = Tessellator.instance;
    int color = block.colorMultiplier(world, x, y, z);
    float red = (color >> 16 & 255) / 255.0F;
    float green = (color >> 8 & 255) / 255.0F;
    float blue = (color & 255) / 255.0F;

    if (EntityRenderer.anaglyphEnable) {
        float anaglyphRed = (red * 30.0F + green * 59.0F + blue * 11.0F) / 100.0F;
        float anaglyphGreen = (red * 30.0F + green * 70.0F) / 100.0F;
        float anaglyphBlue = (red * 30.0F + blue * 70.0F) / 100.0F;
        red = anaglyphRed;
        green = anaglyphGreen;
        blue = anaglyphBlue;
    }

    calculateVerts(world, x, y, z);

    tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
    tessellator.setColorOpaque_F(red, green, blue);
    draw(tessellator, block.getIcon(world, x, y, z, 0));
}
 
开发者ID:AnDwHaT5,项目名称:PixelUtilities,代码行数:23,代码来源:ConveyorRenderer.java

示例13: preDrawFace

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
@Override
public void preDrawFace(IRenderContext renderContext, ForgeDirection dir, boolean internal, float startX, float startY, float endX, float endY, RenderBlocks blocks, Tessellator tessellator, int rotations) {
    int multiplierValue = renderContext.getColorMultiplier();

    float colorR = (float)(multiplierValue >> 16 & 255) / 255.0F;
    float colorG = (float)(multiplierValue >> 8 & 255) / 255.0F;
    float colorB = (float)(multiplierValue & 255) / 255.0F;

    if (EntityRenderer.anaglyphEnable)
    {
        float tempR = (colorR * 30.0F + colorG * 59.0F + colorB * 11.0F) / 100.0F;
        float tempG = (colorR * 30.0F + colorG * 70.0F) / 100.0F;
        float tempB = (colorR * 30.0F + colorB * 70.0F) / 100.0F;
        colorR = tempR;
        colorG = tempG;
        colorB = tempB;
    }

    if (Minecraft.isAmbientOcclusionEnabled() && renderContext.getLightValue() == 0)
        this.ambientOcclusionPreDraw(renderContext, dir, internal, blocks, tessellator, startX, startY, endX, endY, colorR, colorG, colorB, rotations);
    else
        this.colorMultiplierPreDraw(renderContext, dir, internal, blocks, tessellator, colorR, colorG, colorB);
}
 
开发者ID:CannibalVox,项目名称:TechnicBlocks,代码行数:24,代码来源:WorldLightingHandler.java

示例14: calculateBaseColor

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
public static void calculateBaseColor (float[] target, int color) {
    float r = (float)(color >> 16 & 255) / 255f;
    float g = (float)(color >> 8 & 255) / 255f;
    float b = (float)(color & 255) / 255f;

    if (EntityRenderer.anaglyphEnable) {
        float gray = (r * 30f + g * 59f + b * 11f) / 100f;
        float rg = (r * 30f + g * 70f) / 100f;
        float rb = (r * 30f + b * 70f) / 100f;

        r = gray;
        g = rg;
        b = rb;
    }

    target[0] = r;
    target[1] = g;
    target[2] = b;
}
 
开发者ID:jaquadro,项目名称:GardenCollection,代码行数:20,代码来源:RenderHelper.java

示例15: renderCrossedSquares

import net.minecraft.client.renderer.EntityRenderer; //导入方法依赖的package包/类
private void renderCrossedSquares (RenderBlocks renderer, Block block, int x, int y, int z)
{
    Tessellator tessellator = Tessellator.instance;
    tessellator.setBrightness(block.getMixedBrightnessForBlock(renderer.blockAccess, x, y, z));
    int l = block.colorMultiplier(renderer.blockAccess, x, y, z);
    float f = (float)(l >> 16 & 255) / 255.0F;
    float f1 = (float)(l >> 8 & 255) / 255.0F;
    float f2 = (float)(l & 255) / 255.0F;

    if (EntityRenderer.anaglyphEnable)
    {
        float f3 = (f * 30.0F + f1 * 59.0F + f2 * 11.0F) / 100.0F;
        float f4 = (f * 30.0F + f1 * 70.0F) / 100.0F;
        float f5 = (f * 30.0F + f2 * 70.0F) / 100.0F;
        f = f3;
        f1 = f4;
        f2 = f5;
    }

    tessellator.setColorOpaque_F(f, f1, f2);

    IIcon iicon = renderer.getBlockIconFromSideAndMetadata(block, 0, renderer.blockAccess.getBlockMetadata(x, y, z));
    drawCrossedSquares(renderer, iicon, x, y, z, 1.0F);
}
 
开发者ID:jaquadro,项目名称:GardenCollection,代码行数:25,代码来源:HeavyChainRenderer.java


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