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


Java LightUtil.renderQuadColor方法代码示例

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


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

示例1: renderQuads

import net.minecraftforge.client.model.pipeline.LightUtil; //导入方法依赖的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.minecraftforge.client.model.pipeline.LightUtil; //导入方法依赖的package包/类
private void renderQuads(BufferBuilder 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())
        {
            k = this.mc.getItemColors().getColorFromItemstack(stack, bakedquad.getTintIndex());

            if (EntityRenderer.anaglyphEnable)
                k = TextureUtil.anaglyphColor(k);
            k = k | -16777216;
        }
        LightUtil.renderQuadColor(renderer, bakedquad, k);
    }
}
 
开发者ID:Yggard,项目名称:BrokkGUI,代码行数:22,代码来源:GuiRenderItemHelper.java

示例3: renderModel

import net.minecraftforge.client.model.pipeline.LightUtil; //导入方法依赖的package包/类
public static void renderModel(IBakedModel model, int color)
    {
        Tessellator tessellator = Tessellator.getInstance();
        VertexBuffer buffer = tessellator.getBuffer();
        buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.ITEM);
//        buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.ITEM);
//        GlStateManager.disableLighting();

        List<BakedQuad> quads = model.getQuads(null,null,0);

        for (BakedQuad quad : quads)
        {
            LightUtil.renderQuadColor(buffer, quad, color);
        }

        tessellator.draw();
    }
 
开发者ID:M4thG33k,项目名称:TombManyGraves,代码行数:18,代码来源:ModelHelper.java

示例4: renderModel

import net.minecraftforge.client.model.pipeline.LightUtil; //导入方法依赖的package包/类
private static void renderModel(IBakedModel model, VertexFormat fmt, int color)
{
    Tessellator tessellator = Tessellator.getInstance();
    BufferBuilder worldrenderer = tessellator.getBuffer();
    worldrenderer.begin(GL11.GL_QUADS, fmt);
    for (BakedQuad bakedquad : model.getQuads(null, null, 0))
    {
        LightUtil.renderQuadColor(worldrenderer, bakedquad, color);
    }
    tessellator.draw();
}
 
开发者ID:BenjaminSutter,项目名称:genera,代码行数:12,代码来源:ModelHandle.java

示例5: renderQuads

import net.minecraftforge.client.model.pipeline.LightUtil; //导入方法依赖的package包/类
private void renderQuads(final World world, final IBlockState actualState, final BlockPos pos, final List<BakedQuad> quads, final int alpha)
{
    final Tessellator tessellator = Tessellator.getInstance();
    final BufferBuilder buffer = tessellator.getBuffer();

    for (final BakedQuad quad : quads)
    {
        buffer.begin(GL11.GL_QUADS, quad.getFormat());

        final int color = quad.hasTintIndex() ? this.getTint(world, actualState, pos, alpha, quad.getTintIndex()) : alpha | 0xffffff;
        LightUtil.renderQuadColor(buffer, quad, color);

        tessellator.draw();
    }
}
 
开发者ID:maruohon,项目名称:placementpreview,代码行数:16,代码来源:RenderEventHandler.java

示例6: renderBakedModel

import net.minecraftforge.client.model.pipeline.LightUtil; //导入方法依赖的package包/类
public static void renderBakedModel(IBakedModel bakedModel) {
	Tessellator tessellator = Tessellator.getInstance();

	BufferBuilder worldrenderer = tessellator.getBuffer();
	// VertexFormat VF = new VertexFormat();
	// worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);// bakedModel.getFormat());
	// OPTION A
	BakedQuad bakedQuad1 = (BakedQuad) bakedModel.getQuads(null, null, 0).get(0);

	// DARK no normal :( due to baked quad not having it worldrenderer.begin(GL11.GL_QUADS, MYFORMAT);// bakedModel.getFormat());
	worldrenderer.begin(GL11.GL_QUADS, bakedQuad1.getFormat());

	// for (BakedQuad bakedQuad : bakedModel.getQuads(null, null, 0)) {
	// worldrenderer.addVertexData(bakedQuad.getVertexData());
	//
	// }
	// alt version if ever needed

	for (BakedQuad bakedQuad : bakedModel.getQuads(null, null, 0)) {
		int j = -1;
		j = j | -16777216;
		LightUtil.renderQuadColor(worldrenderer, bakedQuad, j);

	}

	tessellator.draw();
}
 
开发者ID:TechStack,项目名称:TechStack-s-HeavyMachineryMod,代码行数:28,代码来源:MachineModModelHelper.java

示例7: renderQuads

import net.minecraftforge.client.model.pipeline.LightUtil; //导入方法依赖的package包/类
private void renderQuads(final IBlockState state, final BlockPos pos, final BufferBuilder buffer, final List<BakedQuad> quads, final int alpha)
{
    final int size = quads.size();

    for (int i = 0; i < size; i++)
    {
        final BakedQuad quad = quads.get(i);
        final int color = quad.getTintIndex() == -1 ? alpha | 0xffffff : this.getTint(state, pos, alpha, quad.getTintIndex());
        LightUtil.renderQuadColor(buffer, quad, color);
    }
}
 
开发者ID:maruohon,项目名称:enderutilities,代码行数:12,代码来源:BuildersWandRenderer.java

示例8: renderModel

import net.minecraftforge.client.model.pipeline.LightUtil; //导入方法依赖的package包/类
public static void renderModel(IBakedModel model, int color)
{
    Tessellator tessellator = Tessellator.getInstance();
    VertexBuffer worldrenderer = tessellator.getBuffer();
    worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
    for (BakedQuad bakedquad : model.getQuads(null, null, 0))
    {
        LightUtil.renderQuadColor(worldrenderer, bakedquad, color);
    }
    tessellator.draw();
}
 
开发者ID:TeamDmfMM,项目名称:Extra-Food,代码行数:12,代码来源:OBJRender.java

示例9: renderTileEntityAt

import net.minecraftforge.client.model.pipeline.LightUtil; //导入方法依赖的package包/类
@Override
public void renderTileEntityAt(TileInfestedLeaves tile, double x, double y, double z, float partialTicks, int destroyStage)
{
    if(tile != null)
    {
        long seed = tile.getWorld().rand.nextLong();
        int color = tile.getColor();
        
        IBlockState leafBlock = tile.getLeafBlock();
        IBakedModel leafModel = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState(leafBlock);
        
        if(leafModel == null)
        {
            leafModel = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState(Blocks.LEAVES.getDefaultState());
        }
        
        List<BakedQuad> leafQuads = Lists.newArrayList();
        
        for(EnumFacing side : EnumFacing.VALUES)
        {
            if(leafBlock.shouldSideBeRendered(tile.getWorld(), tile.getPos(), side))
            {
                leafQuads.addAll(leafModel.getQuads(leafBlock, side, seed));
            }
        }
        
        Tessellator tessellator = Tessellator.getInstance();
        VertexBuffer buffer = tessellator.getBuffer();
        
        bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        
        GlStateManager.pushMatrix();
        GlStateManager.translate(x, y, z);
        RenderHelper.disableStandardItemLighting();
        
        buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.ITEM);
        
        for(BakedQuad quad : leafQuads)
        {
            LightUtil.renderQuadColor(buffer, quad, color);
        }
        
        tessellator.draw();
        
        RenderHelper.enableStandardItemLighting();
        GlStateManager.popMatrix();
    }
}
 
开发者ID:MikeLydeamore,项目名称:ExNihiloAdscensio,代码行数:49,代码来源:RenderInfestedLeaves.java

示例10: renderQuads

import net.minecraftforge.client.model.pipeline.LightUtil; //导入方法依赖的package包/类
private static void renderQuads(BufferBuilder wr, List<BakedQuad> quads) {
	for (BakedQuad quad : quads)
		LightUtil.renderQuadColor(wr, quad, 0xFFFFFFFF);
}
 
开发者ID:OpenMods,项目名称:OpenBlocks,代码行数:5,代码来源:TileEntityTrophyRenderer.java

示例11: renderQuads

import net.minecraftforge.client.model.pipeline.LightUtil; //导入方法依赖的package包/类
private void renderQuads(VertexBuffer renderer, List<BakedQuad> quads) {
  for (BakedQuad quad : quads) {
    LightUtil.renderQuadColor(renderer, quad, -1);
  }
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:6,代码来源:EnchanterModelRenderer.java


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