本文整理汇总了Java中net.minecraft.client.renderer.Tessellator.setColorRGBA_F方法的典型用法代码示例。如果您正苦于以下问题:Java Tessellator.setColorRGBA_F方法的具体用法?Java Tessellator.setColorRGBA_F怎么用?Java Tessellator.setColorRGBA_F使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.Tessellator
的用法示例。
在下文中一共展示了Tessellator.setColorRGBA_F方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderParticle
import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
@Override
public void renderParticle(Tessellator tessellator, float delta, float rotationX, float rotationXZ,
float rotationZ, float rotationYZ, float rotationXY) {
tessellator.draw();
tessellator.startDrawingQuads();
textureManager.bindTexture(texture);
float f6 = 0.0f;
float f7 = 1.0f;
float f8 = 0.0f;
float f9 = 1.0f;
float scale = 0.1F * this.particleScale;
float f11 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)delta - interpPosX);
float f12 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)delta - interpPosY);
float f13 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)delta - interpPosZ);
tessellator.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha);
tessellator.addVertexWithUV((double)(f11 - rotationX * scale - rotationYZ * scale), (double)(f12 - rotationXZ * scale), (double)(f13 - rotationZ * scale - rotationXY * scale), (double)f7, (double)f9);
tessellator.addVertexWithUV((double)(f11 - rotationX * scale + rotationYZ * scale), (double)(f12 + rotationXZ * scale), (double)(f13 - rotationZ * scale + rotationXY * scale), (double)f7, (double)f8);
tessellator.addVertexWithUV((double)(f11 + rotationX * scale + rotationYZ * scale), (double)(f12 + rotationXZ * scale), (double)(f13 + rotationZ * scale + rotationXY * scale), (double)f6, (double)f8);
tessellator.addVertexWithUV((double)(f11 + rotationX * scale - rotationYZ * scale), (double)(f12 - rotationXZ * scale), (double)(f13 + rotationZ * scale - rotationXY * scale), (double)f6, (double)f9);
tessellator.draw();
tessellator.startDrawingQuads();
textureManager.bindTexture(TextureMap.locationItemsTexture);
}
示例2: drawGradientRect
import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
private void drawGradientRect(int zLevel, int p_73733_1_, int p_73733_2_, int p_73733_3_, int p_73733_4_, int p_73733_5_, int p_73733_6_)
{
float f = (float) (p_73733_5_ >> 24 & 255) / 255.0F;
float f1 = (float) (p_73733_5_ >> 16 & 255) / 255.0F;
float f2 = (float) (p_73733_5_ >> 8 & 255) / 255.0F;
float f3 = (float) (p_73733_5_ & 255) / 255.0F;
float f4 = (float) (p_73733_6_ >> 24 & 255) / 255.0F;
float f5 = (float) (p_73733_6_ >> 16 & 255) / 255.0F;
float f6 = (float) (p_73733_6_ >> 8 & 255) / 255.0F;
float f7 = (float) (p_73733_6_ & 255) / 255.0F;
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_ALPHA_TEST);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glShadeModel(GL11.GL_SMOOTH);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setColorRGBA_F(f1, f2, f3, f);
tessellator.addVertex((double) p_73733_3_, (double) p_73733_2_, (double) zLevel);
tessellator.addVertex((double) p_73733_1_, (double) p_73733_2_, (double) zLevel);
tessellator.setColorRGBA_F(f5, f6, f7, f4);
tessellator.addVertex((double) p_73733_1_, (double) p_73733_4_, (double) zLevel);
tessellator.addVertex((double) p_73733_3_, (double) p_73733_4_, (double) zLevel);
tessellator.draw();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_TEXTURE_2D);
}
示例3: drawGradientRect
import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
protected void drawGradientRect(int par1, int par2, int par3, int par4, int par5, int par6)
{
float f = (float)(par5 >> 24 & 255) / 255.0F;
float f1 = (float)(par5 >> 16 & 255) / 255.0F;
float f2 = (float)(par5 >> 8 & 255) / 255.0F;
float f3 = (float)(par5 & 255) / 255.0F;
float f4 = (float)(par6 >> 24 & 255) / 255.0F;
float f5 = (float)(par6 >> 16 & 255) / 255.0F;
float f6 = (float)(par6 >> 8 & 255) / 255.0F;
float f7 = (float)(par6 & 255) / 255.0F;
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_ALPHA_TEST);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glShadeModel(GL11.GL_SMOOTH);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setColorRGBA_F(f1, f2, f3, f);
tessellator.addVertex((double)par3, (double)par2, 0.0D);
tessellator.addVertex((double)par1, (double)par2, 0.0D);
tessellator.setColorRGBA_F(f5, f6, f7, f4);
tessellator.addVertex((double)par1, (double)par4, 0.0D);
tessellator.addVertex((double)par3, (double)par4, 0.0D);
tessellator.draw();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_TEXTURE_2D);
}