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


Java Tessellator.setNormal方法代码示例

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


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

示例1: renderIcon

import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
private void renderIcon(IIcon icon) {
	Tessellator tessellator = Tessellator.instance;

	float minU = icon.getMinU();
	float maxU = icon.getMaxU();
	float minV = icon.getMinV();
	float maxV = icon.getMaxV();

	OpenGLHelper.rotate(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
	OpenGLHelper.rotate(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
	tessellator.startDrawingQuads();
	tessellator.setNormal(0.0F, 1.0F, 0.0F);
	tessellator.addVertexWithUV(-0.5F, -0.25F, 0.0D, minU, maxV);
	tessellator.addVertexWithUV(0.5F, -0.25F, 0.0D, maxU, maxV);
	tessellator.addVertexWithUV(0.5F, 0.75F, 0.0D, maxU, minV);
	tessellator.addVertexWithUV(-0.5F, 0.75F, 0.0D, minU, minV);
	tessellator.draw();
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:19,代码来源:LingeringPotionRenderer.java

示例2: renderCube

import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
private void renderCube(RenderBlocks renderer, Block block, int meta) {
	Tessellator tessellator = Tessellator.instance;
	tessellator.startDrawingQuads();
	tessellator.setNormal(0.0F, -1.0F, 0.0F);
	renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, meta));
	tessellator.setNormal(0.0F, 1.0F, 0.0F);
	renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, meta));
	tessellator.setNormal(0.0F, 0.0F, -1.0F);
	renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, meta));
	tessellator.setNormal(0.0F, 0.0F, 1.0F);
	renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, meta));
	tessellator.setNormal(-1.0F, 0.0F, 0.0F);
	renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, meta));
	tessellator.setNormal(1.0F, 0.0F, 0.0F);
	renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, meta));
	tessellator.draw();
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:18,代码来源:BlockChorusFlowerRender.java

示例3: func_77026_a

import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
private void func_77026_a(Tessellator par1Tessellator, Icon par2Icon)
{
    float f = par2Icon.getMinU();
    float f1 = par2Icon.getMaxU();
    float f2 = par2Icon.getMinV();
    float f3 = par2Icon.getMaxV();
    float f4 = 1.0F;
    float f5 = 0.5F;
    float f6 = 0.25F;
    GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    par1Tessellator.startDrawingQuads();
    par1Tessellator.setNormal(0.0F, 1.0F, 0.0F);
    par1Tessellator.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, (double)f, (double)f3);
    par1Tessellator.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, (double)f1, (double)f3);
    par1Tessellator.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, (double)f1, (double)f2);
    par1Tessellator.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2);
    par1Tessellator.draw();
}
 
开发者ID:marcus8448,项目名称:IceMod,代码行数:20,代码来源:RenderHunkOIce.java

示例4: renderInventoryBlock

import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
public static void renderInventoryBlock(RenderBlocks renderblocks, Block block, IIcon icon) {
	
	Tessellator tessellator = Tessellator.instance;
	GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
	tessellator.startDrawingQuads();
	tessellator.setNormal(0.0F, -1F, 0.0F);
	renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, getValidIIcon(icon));
	tessellator.draw();
	tessellator.startDrawingQuads();
	tessellator.setNormal(0.0F, 1.0F, 0.0F);
	renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, getValidIIcon(icon));
	tessellator.draw();
	tessellator.startDrawingQuads();
	tessellator.setNormal(0.0F, 0.0F, -1F);
	renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, getValidIIcon(icon));
	tessellator.draw();
	tessellator.startDrawingQuads();
	tessellator.setNormal(0.0F, 0.0F, 1.0F);
	renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, getValidIIcon(icon));
	tessellator.draw();
	tessellator.startDrawingQuads();
	tessellator.setNormal(-1F, 0.0F, 0.0F);
	renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, getValidIIcon(icon));
	tessellator.draw();
	tessellator.startDrawingQuads();
	tessellator.setNormal(1.0F, 0.0F, 0.0F);
	renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, getValidIIcon(icon));
	tessellator.draw();
	GL11.glTranslatef(0.5F, 0.5F, 0.5F);
	
}
 
开发者ID:grand-mine-inc,项目名称:Steam-and-Steel,代码行数:32,代码来源:Utils.java

示例5: renderInvBlock

import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
private static void renderInvBlock(Block block, RenderBlocks renderer)
{
    Tessellator var14 = Tessellator.instance;
    
    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
    var14.startDrawingQuads();
    var14.setNormal(0.0F, -1.0F, 0.0F);
    renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, 0));
    var14.draw();
    var14.startDrawingQuads();
    var14.setNormal(0.0F, 1.0F, 0.0F);
    renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, 0));
    var14.draw();
    var14.startDrawingQuads();
    var14.setNormal(-1.0F, 0.0F, 0.0F);
    renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, 0));
    var14.draw();
    var14.startDrawingQuads();
    var14.setNormal(0.0F, 0.0F, -1.0F);
    renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, 0));
    var14.draw();
    var14.startDrawingQuads();
    var14.setNormal(-1.0F, 0.0F, 0.0F);
    renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, 0));
    var14.draw();
    var14.startDrawingQuads();
    var14.setNormal(0.0F, 0.0F, 1.0F);
    renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, 0));
    var14.draw();
    GL11.glTranslatef(0.5F, 0.5F, 0.5F);
}
 
开发者ID:Wahazar,项目名称:TFCPrimitiveTech,代码行数:32,代码来源:RenderWoodenPress.java

示例6: renderInventoryBlock

import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
@Override
public void renderInventoryBlock(Block block, int meta, int modelID, RenderBlocks renderer) {
	Tessellator tessellator = Tessellator.instance;
	OpenGLHelper.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
	OpenGLHelper.enableBlend();
	OpenGLHelper.translate(-0.5F, -0.5F, -0.5F);

	float f = 0.0625F;
	renderer.setRenderBounds(f * 3, f * 3, f * 3, f * 13, f * 13, f * 13);
	tessellator.startDrawingQuads();
	tessellator.setNormal(0.0F, -1.0F, 0.0F);
	renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, meta));
	tessellator.setNormal(0.0F, 1.0F, 0.0F);
	renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, meta));
	tessellator.setNormal(0.0F, 0.0F, -1.0F);
	renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, meta));
	tessellator.setNormal(0.0F, 0.0F, 1.0F);
	renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, meta));
	tessellator.setNormal(-1.0F, 0.0F, 0.0F);
	renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, meta));
	tessellator.setNormal(1.0F, 0.0F, 0.0F);
	renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, meta));
	tessellator.draw();

	renderer.setRenderBounds(0, 0, 0, 1, 1, 1);
	tessellator.startDrawingQuads();
	tessellator.setNormal(0.0F, -1.0F, 0.0F);
	renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, meta));
	tessellator.setNormal(0.0F, 1.0F, 0.0F);
	renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, meta));
	tessellator.setNormal(0.0F, 0.0F, -1.0F);
	renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, meta));
	tessellator.setNormal(0.0F, 0.0F, 1.0F);
	renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, meta));
	tessellator.setNormal(-1.0F, 0.0F, 0.0F);
	renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, meta));
	tessellator.setNormal(1.0F, 0.0F, 0.0F);
	renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, meta));
	tessellator.draw();

	OpenGLHelper.translate(0.5F, 0.5F, 0.5F);
	OpenGLHelper.disableBlend();
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:44,代码来源:BlockSlimeBlockRender.java

示例7: renderRod

import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
public static void renderRod(RenderBlocks renderer, Block block, int meta) {
	Tessellator tessellator = Tessellator.instance;

	double x = 7 / 16.0;
	double y = 0;
	double z = 7 / 16.0;
	renderer.setRenderBounds(0, 1 / 16F, 0, 2 / 16F, 1, 2 / 16F);
	tessellator.startDrawingQuads();
	tessellator.setNormal(0.0F, -1.0F, 0.0F);
	renderer.renderFaceYNeg(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 0, meta));
	tessellator.setNormal(0.0F, 1.0F, 0.0F);
	renderer.renderFaceYPos(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 1, meta));
	tessellator.setNormal(0.0F, 0.0F, -1.0F);
	renderer.renderFaceZNeg(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 2, meta));
	tessellator.setNormal(0.0F, 0.0F, 1.0F);
	renderer.renderFaceZPos(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 3, meta));
	tessellator.setNormal(-1.0F, 0.0F, 0.0F);
	renderer.renderFaceXNeg(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 4, meta));
	tessellator.setNormal(1.0F, 0.0F, 0.0F);
	renderer.renderFaceXPos(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 5, meta));
	tessellator.draw();

	x = 4 / 16.0;
	y = 0;
	z = 4 / 16.0;
	renderer.setRenderBounds(2 / 16F, 0, 2 / 16F, 6 / 16F, 1 / 16F, 6 / 16F);
	tessellator.startDrawingQuads();
	tessellator.setNormal(0.0F, -1.0F, 0.0F);
	renderer.renderFaceYNeg(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 0, meta));
	tessellator.setNormal(0.0F, 1.0F, 0.0F);
	renderer.renderFaceYPos(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 1, meta));
	y = -13 / 16.0;
	renderer.setRenderBounds(2 / 16F, 13 / 16F, 2 / 16F, 6 / 16F, 14 / 16F, 6 / 16F);
	tessellator.setNormal(0.0F, 0.0F, -1.0F);
	renderer.renderFaceZNeg(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 2, meta));
	tessellator.setNormal(0.0F, 0.0F, 1.0F);
	renderer.renderFaceZPos(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 3, meta));
	tessellator.setNormal(-1.0F, 0.0F, 0.0F);
	renderer.renderFaceXNeg(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 4, meta));
	tessellator.setNormal(1.0F, 0.0F, 0.0F);
	renderer.renderFaceXPos(block, x, y, z, renderer.getBlockIconFromSideAndMetadata(block, 5, meta));
	tessellator.draw();
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:44,代码来源:TileEntityEndRodRenderer.java

示例8: doRender_TossedItem

import net.minecraft.client.renderer.Tessellator; //导入方法依赖的package包/类
public void doRender_TossedItem(Entity shot, double x, double y, double z, int type)
 {
     GL11.glPushMatrix();
      this.bindEntityTexture(shot);
      GL11.glTranslatef((float)x, (float)y, (float)z);
      
      GL11.glEnable(GL12.GL_RESCALE_NORMAL);
      
      float f2 = 0.5f;

GL11.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F);
      
      IIcon icon = Items.baked_potato.getIconFromDamage(0);	// Default, to be overridden with the actual thing
      
      if (type == 1) { icon = Items.gold_nugget.getIconFromDamage(0); }
      else if (type == 2) { icon = Items.glass_bottle.getIconFromDamage(0); }
      else if (type == 3) { icon = Items.baked_potato.getIconFromDamage(0); }
      else if (type == 4) { icon = Items.melon_seeds.getIconFromDamage(0); }
      else if (type == 5) { icon = Items.glowstone_dust.getIconFromDamage(0); }
      else if (type == 6) { icon = Items.water_bucket.getIconFromDamage(0); }
      else if (type == 7) { icon = Items.snowball.getIconFromDamage(0); }
      
      Tessellator tessellator = Tessellator.instance;
      
float f3 = icon.getMinU();
      float f4 = icon.getMaxU();
      float f5 = icon.getMinV();
      float f6 = icon.getMaxV();
      float f7 = 1.0F;
      float f8 = 0.5F;
      float f9 = 0.25F;
      
      GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
      
      tessellator.startDrawingQuads();
       tessellator.setNormal(0.0F, 1.0F, 0.0F);
       tessellator.addVertexWithUV((double)(0.0F - f8), (double)(0.0F - f9), 0.0D, (double)f3, (double)f6);
       tessellator.addVertexWithUV((double)(f7 - f8), (double)(0.0F - f9), 0.0D, (double)f4, (double)f6);
       tessellator.addVertexWithUV((double)(f7 - f8), (double)(1.0F - f9), 0.0D, (double)f4, (double)f5);
       tessellator.addVertexWithUV((double)(0.0F - f8), (double)(1.0F - f9), 0.0D, (double)f3, (double)f5);
      tessellator.draw();
      
      GL11.glDisable(GL12.GL_RESCALE_NORMAL);
     GL11.glPopMatrix();
 }
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:47,代码来源:Render_Projectile.java


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