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


Java RenderBlocks.renderStandardBlockWithColorMultiplier方法代码示例

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


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

示例1: renderWorldBlock

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的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

示例2: renderWorldBlock

import net.minecraft.client.renderer.RenderBlocks; //导入方法依赖的package包/类
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
	TELatexExtractor te = (TELatexExtractor) world.getTileEntity(x, y, z);
	Block latexBlock = ModBlocks.latex;
	float p = 0.0625f;
	
	renderer.renderAllFaces = true;
	GL11.glPushMatrix();

	if (te.getLatexAmount() > 0 && te.isBowlInstalled()) {
		FluidStack fs = new FluidStack(ModFluids.LATEX, te.getLatexAmount());

		int color = fs.getFluid().getColor(fs);
		float f = (color >> 16 & 255) / 255.0F;
		float f1 = (color >> 8 & 255) / 255.0F;
		float f2 = (color & 255) / 255.0F;
		float h = 4*p * (fs.amount / 200f);
		
		IIcon still = fs.getFluid().getStillIcon();
		
		setRotatedRenderBounds(renderer, te.rotation, MIN_X+5*p, MIN_Y+p, MIN_Z+7*p, MAX_X-5*p, MIN_Y+p+h, MAX_Z-3*p);
		renderer.setOverrideBlockTexture(still);
		renderer.renderStandardBlockWithColorMultiplier(latexBlock, x, y, z, f, f1, f2);
		renderer.clearOverrideBlockTexture();
		
	}
	
	rotate(renderer, 0);
	renderer.renderAllFaces = false;
	GL11.glPopMatrix();
	
	return true;
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:34,代码来源:RenderLatexExtractor.java


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