當前位置: 首頁>>代碼示例>>Java>>正文


Java Tessellator.setColorRGBA_F方法代碼示例

本文整理匯總了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);
}
 
開發者ID:Kanbe-Kotori,項目名稱:ExtraAcC,代碼行數:25,代碼來源:EntityParticleFX.java

示例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);
}
 
開發者ID:CreeperHost,項目名稱:CreeperHostGui,代碼行數:30,代碼來源:CreeperHostEntry.java

示例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);
}
 
開發者ID:Pishka,項目名稱:MineDonate,代碼行數:30,代碼來源:GuiScrollingList.java


注:本文中的net.minecraft.client.renderer.Tessellator.setColorRGBA_F方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。