本文整理汇总了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);
}
}
示例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);
}
}
示例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();
}
示例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();
}
示例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();
}
}
示例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();
}
示例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);
}
}
示例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();
}
示例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();
}
}
示例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);
}
示例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);
}
}