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


Java OpenGlHelper.setLightmapTextureCoords方法代码示例

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


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

示例1: doRenderLayer

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
@Override
public void doRenderLayer(EntityFrienderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
	endermanRenderer.bindTexture(RES_ENDERMAN_EYES);
	GlStateManager.enableBlend();
	GlStateManager.disableAlpha();
	GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
	GlStateManager.disableLighting();
	GlStateManager.depthMask(!entitylivingbaseIn.isInvisible());
	OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 61680.0F, 0.0F);
	GlStateManager.enableLighting();
	GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
	endermanRenderer.getMainModel().render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
	endermanRenderer.setLightmap(entitylivingbaseIn);
	GlStateManager.depthMask(true);
	GlStateManager.disableBlend();
	GlStateManager.enableAlpha();
}
 
开发者ID:p455w0rd,项目名称:EndermanEvolution,代码行数:18,代码来源:LayerFriendermanEyes.java

示例2: renderLightMap

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void renderLightMap(float skullRotation, float skullPitch, EntityLivingBase entity) {
	GlStateManager.pushMatrix();
	GlStateManager.enableBlend();
	GlStateManager.blendFunc(GL11.GL_ONE, GL11.GL_ONE);
	GlStateManager.depthMask(true);
	float brightnessX = OpenGlHelper.lastBrightnessX;
	float brightnessY = OpenGlHelper.lastBrightnessY;
	OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 61680, 0);

	if (entity != null && entity instanceof EntityLivingBase) {
		render(skullRotation, skullPitch, entity);
	}
	else {
		render(skullRotation, skullPitch, null);
	}

	OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, brightnessX, brightnessY);
	GlStateManager.disableBlend();
	GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
	GlStateManager.popMatrix();
}
 
开发者ID:p455w0rd,项目名称:EndermanEvolution,代码行数:22,代码来源:ModelSkullBase.java

示例3: doRenderLayer

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    this.endermanRenderer.bindTexture(field_177203_a);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(1, 1);
    GlStateManager.disableLighting();
    GlStateManager.depthMask(!entitylivingbaseIn.isInvisible());
    int i = 61680;
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.endermanRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
    this.endermanRenderer.func_177105_a(entitylivingbaseIn, partialTicks);
    GlStateManager.depthMask(true);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:21,代码来源:LayerEndermanEyes.java

示例4: doRenderLayer

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
@Override
public void doRenderLayer(EntityMeeCreeps entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate != null) {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-0.5F, -0.5F, 0.5F);
        int i = entitylivingbaseIn.getBrightnessForRender();
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j, k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
 
开发者ID:McJty,项目名称:MeeCreeps,代码行数:26,代码来源:LayerRenderHeldBlock.java

示例5: renderParticle

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
/**
 * Renders the particle
 */
public void renderParticle(WorldRenderer worldRendererIn, Entity entityIn, float partialTicks, float p_180434_4_, float p_180434_5_, float p_180434_6_, float p_180434_7_, float p_180434_8_)
{
    float f = ((float)this.age + partialTicks) / (float)this.maxAge;
    f = f * f;
    double d0 = this.field_174840_a.posX;
    double d1 = this.field_174840_a.posY;
    double d2 = this.field_174840_a.posZ;
    double d3 = this.field_174843_ax.lastTickPosX + (this.field_174843_ax.posX - this.field_174843_ax.lastTickPosX) * (double)partialTicks;
    double d4 = this.field_174843_ax.lastTickPosY + (this.field_174843_ax.posY - this.field_174843_ax.lastTickPosY) * (double)partialTicks + (double)this.field_174841_aA;
    double d5 = this.field_174843_ax.lastTickPosZ + (this.field_174843_ax.posZ - this.field_174843_ax.lastTickPosZ) * (double)partialTicks;
    double d6 = d0 + (d3 - d0) * (double)f;
    double d7 = d1 + (d4 - d1) * (double)f;
    double d8 = d2 + (d5 - d2) * (double)f;
    int i = this.getBrightnessForRender(partialTicks);
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    d6 = d6 - interpPosX;
    d7 = d7 - interpPosY;
    d8 = d8 - interpPosZ;
    this.field_174842_aB.renderEntityWithPosYaw(this.field_174840_a, (double)((float)d6), (double)((float)d7), (double)((float)d8), this.field_174840_a.rotationYaw, partialTicks);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:27,代码来源:EntityPickupFX.java

示例6: renderParticle

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
/**
 * Renders the particle
 */
public void renderParticle(VertexBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ)
{
    float f = ((float)this.age + partialTicks) / (float)this.maxAge;
    f = f * f;
    double d0 = this.item.posX;
    double d1 = this.item.posY;
    double d2 = this.item.posZ;
    double d3 = this.target.lastTickPosX + (this.target.posX - this.target.lastTickPosX) * (double)partialTicks;
    double d4 = this.target.lastTickPosY + (this.target.posY - this.target.lastTickPosY) * (double)partialTicks + (double)this.yOffset;
    double d5 = this.target.lastTickPosZ + (this.target.posZ - this.target.lastTickPosZ) * (double)partialTicks;
    double d6 = d0 + (d3 - d0) * (double)f;
    double d7 = d1 + (d4 - d1) * (double)f;
    double d8 = d2 + (d5 - d2) * (double)f;
    int i = this.getBrightnessForRender(partialTicks);
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    d6 = d6 - interpPosX;
    d7 = d7 - interpPosY;
    d8 = d8 - interpPosZ;
    GlStateManager.enableLighting();
    this.renderManager.doRenderEntity(this.item, d6, d7, d8, this.item.rotationYaw, partialTicks, false);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:28,代码来源:ParticleItemPickup.java

示例7: doRenderLayer

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void doRenderLayer(EntityDragon entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    this.dragonRenderer.bindTexture(TEXTURE);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(1, 1);
    GlStateManager.disableLighting();
    GlStateManager.depthFunc(514);
    int i = 61680;
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.dragonRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
    this.dragonRenderer.func_177105_a(entitylivingbaseIn, partialTicks);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
    GlStateManager.depthFunc(515);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:21,代码来源:LayerEnderDragonEyes.java

示例8: renderTileEntity

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void renderTileEntity(TileEntity tileentityIn, float partialTicks, int destroyStage)
{
    if (tileentityIn.getDistanceSq(this.entityX, this.entityY, this.entityZ) < tileentityIn.getMaxRenderDistanceSquared())
    {
        RenderHelper.enableStandardItemLighting();
        if(!drawingBatch || !tileentityIn.hasFastRenderer())
        {
        int i = this.worldObj.getCombinedLight(tileentityIn.getPos(), 0);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        }
        BlockPos blockpos = tileentityIn.getPos();
        this.renderTileEntityAt(tileentityIn, (double)blockpos.getX() - staticPlayerX, (double)blockpos.getY() - staticPlayerY, (double)blockpos.getZ() - staticPlayerZ, partialTicks, destroyStage);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:18,代码来源:TileEntityRendererDispatcher.java

示例9: renderTileEntity

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void renderTileEntity(TileEntity tileentityIn, float partialTicks, int destroyStage)
{
    if (tileentityIn.getDistanceSq(this.entityX, this.entityY, this.entityZ) < tileentityIn.getMaxRenderDistanceSquared())
    {
        int i = this.worldObj.getCombinedLight(tileentityIn.getPos(), 0);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        BlockPos blockpos = tileentityIn.getPos();
        this.renderTileEntityAt(tileentityIn, (double)blockpos.getX() - staticPlayerX, (double)blockpos.getY() - staticPlayerY, (double)blockpos.getZ() - staticPlayerZ, partialTicks, destroyStage);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:14,代码来源:TileEntityRendererDispatcher.java

示例10: func_177105_a

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void func_177105_a(T entityLivingIn, float partialTicks)
{
    int i = entityLivingIn.getBrightnessForRender(partialTicks);
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:8,代码来源:RenderLiving.java

示例11: renderLightMapOnPlayerHead

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void renderLightMapOnPlayerHead(World world, EntityLivingBase wearer) {
	GlStateManager.pushMatrix();
	GlStateManager.enableBlend();
	GlStateManager.blendFunc(GL11.GL_ONE, GL11.GL_ONE);
	GlStateManager.depthMask(true);
	float brightnessX = OpenGlHelper.lastBrightnessX;
	float brightnessY = OpenGlHelper.lastBrightnessY;
	OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 61680, 0);
	head.render(0.01F);
	OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, brightnessX, brightnessY);
	GlStateManager.disableBlend();
	GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
	GlStateManager.popMatrix();
}
 
开发者ID:p455w0rd,项目名称:EndermanEvolution,代码行数:15,代码来源:ModelSkullBase.java

示例12: setLightmap

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
private void setLightmap(EntityPainting painting, float p_77008_2_, float p_77008_3_)
{
    int i = MathHelper.floor_double(painting.posX);
    int j = MathHelper.floor_double(painting.posY + (double)(p_77008_3_ / 16.0F));
    int k = MathHelper.floor_double(painting.posZ);
    EnumFacing enumfacing = painting.facingDirection;

    if (enumfacing == EnumFacing.NORTH)
    {
        i = MathHelper.floor_double(painting.posX + (double)(p_77008_2_ / 16.0F));
    }

    if (enumfacing == EnumFacing.WEST)
    {
        k = MathHelper.floor_double(painting.posZ - (double)(p_77008_2_ / 16.0F));
    }

    if (enumfacing == EnumFacing.SOUTH)
    {
        i = MathHelper.floor_double(painting.posX - (double)(p_77008_2_ / 16.0F));
    }

    if (enumfacing == EnumFacing.EAST)
    {
        k = MathHelper.floor_double(painting.posZ + (double)(p_77008_2_ / 16.0F));
    }

    int l = this.renderManager.worldObj.getCombinedLight(new BlockPos(i, j, k), 0);
    int i1 = l % 65536;
    int j1 = l / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)i1, (float)j1);
    GlStateManager.color(1.0F, 1.0F, 1.0F);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:34,代码来源:RenderPainting.java

示例13: doRenderLayer

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void doRenderLayer(EntitySpider entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    this.spiderRenderer.bindTexture(SPIDER_EYES);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(1, 1);

    if (entitylivingbaseIn.isInvisible())
    {
        GlStateManager.depthMask(false);
    }
    else
    {
        GlStateManager.depthMask(true);
    }

    int i = 61680;
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.spiderRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
    i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
    j = i % 65536;
    k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    this.spiderRenderer.func_177105_a(entitylivingbaseIn, partialTicks);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:31,代码来源:LayerSpiderEyes.java

示例14: render

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
@Override
public void render(TileEntityCaulronBlock te, double x, double y, double z, float partialTicks, int destroyStage,
		float alpha) {	
	super.render(te, x, y, z, partialTicks, destroyStage, alpha);
	if(te.isLeader())
       {
       	if((ParticleCauldronTop)particleMap.get(te.getPos()) != null)
			((ParticleCauldronTop)particleMap.get(te.getPos())).kill();
		if(!levelMove.containsKey(te.getPos()))
			levelMove.put(te.getPos(), (double) te.getLevel());
		if(!serialMove.containsKey(te.getPos()))
			serialMove.put(te.getPos(), 0);
		serialMove.put(te.getPos(), serialMove.get(te.getPos()) + 1);
		if(levelMove.get(te.getPos()).floatValue() != te.getLevel())
		{
			float moveBy = 0.08f;
			levelMove.put(te.getPos(), levelMove.get(te.getPos()) + (Math.min(levelMove.get(te.getPos()), te.getLevel()) == te.getLevel()? - moveBy : moveBy));
		}
       }
	GlStateManager.pushMatrix();
       {
       	GlStateManager.translate(x, y, z);
   		GlStateManager.scale(te.getSize(), te.getSize(), te.getSize());
   		for(int i = 0; i < te.handler.getSlots();i ++)
           {
           	if(!te.handler.getStackInSlot(i).isEmpty())
           	{
           		double l_move = levelMove.get(te.getPos()) / te.getMaxLevels();
           		l_move *= 10 * 30;
           		l_move = (int) l_move;
           		l_move /= 10 * 30;
           		double y_pos = Math.sin(serialMove.get(te.getPos()) / 50d) / 50d + 0.2f + (l_move * te.getSize() * 0.75f) + (te.z_Positions[i] + te.x_Positions[i]) / 50;
           		if(te.getLevel() == 0)
           			y_pos = 0.02f * te.getSize();  		
           		y_pos /= te.getSize();
           		y_pos += 0.025;
           		float inter_size = 0.6f - (0.05f * te.getSize());
           		GlStateManager.translate((te.x_Positions[i] * (1 - inter_size)) + (inter_size / 2f), y_pos, (te.z_Positions[i] * (1 - inter_size)) + (inter_size / 2f));
               	EntityItem item = new EntityItem(getWorld(), 0, 0, 0, te.handler.getStackInSlot(i));
               	item.hoverStart = 0f;
                   GlStateManager.scale(1f / te.getSize(), 1f / te.getSize(), 1f / te.getSize());
               	GlStateManager.rotate(90, 1, 0, 0);
               	GlStateManager.rotate(te.y_Rotation[i], 0, 0, 1);
       			Minecraft.getMinecraft().getRenderManager().renderEntity(item, 0f, 0f, 0f, 0f, 0f, false);
               	GlStateManager.rotate(-te.y_Rotation[i], 0, 0, 1);
                   GlStateManager.scale(te.getSize(), te.getSize(), te.getSize());
               	GlStateManager.rotate(-90, 1, 0, 0);
       			GlStateManager.translate(-((te.x_Positions[i] * (1 - inter_size)) + (inter_size / 2f)), -y_pos, -((te.z_Positions[i] * (1 - inter_size)) + (inter_size / 2f)));
           	}
           }
           GlStateManager.disableLighting();
           OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240f, 240f);
           this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
           World world = getWorld();
           GlStateManager.translate(-te.getPos().getX(), -te.getPos().getY(), -te.getPos().getZ());
           Tessellator tessellator = Tessellator.getInstance();
           tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
           if(te.isLeader() && world != null)
   	        Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModel(world, CauldronBlock.MODELS.get(te.getSize()),
   	        		world.getBlockState(te.getPos()), te.getPos(), Tessellator.getInstance().getBuffer(), false);
           tessellator.draw();
           if(te.getFluid() != null && te.getFluid().getStateOrLoc() instanceof ResourceLocation)
           	this.bindTexture((ResourceLocation) te.getFluid().getStateOrLoc());
           GlStateManager.translate(te.getPos().getX(), te.getPos().getY(), te.getPos().getZ());
           GlStateManager.enableLighting();
       	GlStateManager.translate(-x, -y, -z);
       	if(te.isLeader())
		{
   			if(te.getLevel() > 0 && te.getFluid() != null)
   				particleMap.put(te.getPos(), HarshenCastle.proxy.spawnParticle(EnumHarshenParticle.CAULDRON_LIQUID, 
   						new Vec3d(te.getPos()).addVector(te.getSize() / 2f, 
   								Math.sin(serialMove.get(te.getPos()) / 50d) / 50d + 0.3f + ((levelMove.get(te.getPos()) / te.getMaxLevels()) * te.getSize() * 0.75f), te.getSize() / 2f), 
   						Vec3d.ZERO, te.getSize() / 2.5f, true, te.getFluid().getStateOrLoc()));
		}
       }
   	GlStateManager.popMatrix();

}
 
开发者ID:kenijey,项目名称:harshencastle,代码行数:79,代码来源:RendererCauldronBlock.java

示例15: doRender

import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityThrown entity, double x, double y, double z, float entityYaw, float partialTicks)
{
	if(entity.isLocation())
	{
		GlStateManager.pushMatrix();
        GlStateManager.translate((float)x, (float)y, (float)z);
        GlStateManager.disableLighting();
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240f, 240f);
        this.bindEntityTexture(entity);
        int i = entity.getLocation().getId();
        if(i == 1)
        	GlStateManager.depthFunc(519);
        float f = (float)(i % 4 * 16 + 0) / 64.0F;
        float f1 = (float)(i % 4 * 16 + 16) / 64.0F;
        float f2 = (float)(i / 4 * 16 + 0) / 64.0F;
        float f3 = (float)(i / 4 * 16 + 16) / 64.0F;
        GlStateManager.translate(0.0F, -0.1F, 0.0F);
        GlStateManager.rotate(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
        GlStateManager.rotate((float)(this.renderManager.options.thirdPersonView == 2 ? -1 : 1) * -this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
        float f7 = 0.3F;
        GlStateManager.scale(0.3F, 0.3F, 0.3F);
        GlStateManager.translate(0.1F, 0.0F, 0.0F);
        Tessellator tessellator = Tessellator.getInstance();
        BufferBuilder bufferbuilder = tessellator.getBuffer();
        bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
        if (this.renderOutlines)
        {
            GlStateManager.enableColorMaterial();
            GlStateManager.enableOutlineMode(this.getTeamColor(entity));
        }
        bufferbuilder.pos(-0.5D, -0.25D, 0.0D).tex((double)f, (double)f3).color(255, 255, 255, 255).normal(0.0F, 1.0F, 0.0F).endVertex();
        bufferbuilder.pos(0.5D, -0.25D, 0.0D).tex((double)f1, (double)f3).color(255, 255, 255, 255).normal(0.0F, 1.0F, 0.0F).endVertex();
        bufferbuilder.pos(0.5D, 0.75D, 0.0D).tex((double)f1, (double)f2).color(255, 255, 255, 255).normal(0.0F, 1.0F, 0.0F).endVertex();
        bufferbuilder.pos(-0.5D, 0.75D, 0.0D).tex((double)f, (double)f2).color(255, 255, 255, 255).normal(0.0F, 1.0F, 0.0F).endVertex();
        tessellator.draw();
        GlStateManager.disableRescaleNormal();
    	GlStateManager.depthFunc(515);
        GlStateManager.enableLighting();
        GlStateManager.popMatrix();
        super.doRender(entity, x, y, z, entityYaw, partialTicks);
	}
	else
	{
		GlStateManager.pushMatrix();
        GlStateManager.translate((float)x, (float)y, (float)z);
        GlStateManager.enableRescaleNormal();
        GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
        GlStateManager.rotate((float)(this.renderManager.options.thirdPersonView == 2 ? -1 : 1) * this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
        this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        
        if (this.renderOutlines)
        {
            GlStateManager.enableColorMaterial();
            GlStateManager.enableOutlineMode(this.getTeamColor(entity));
        }
        
        Minecraft.getMinecraft().getRenderItem().renderItem(entity.getStack(), ItemCameraTransforms.TransformType.GROUND);

        if (this.renderOutlines)
        {
            GlStateManager.disableOutlineMode();
            GlStateManager.disableColorMaterial();
        }

        GlStateManager.disableRescaleNormal();
        GlStateManager.popMatrix();
	}
}
 
开发者ID:kenijey,项目名称:harshencastle,代码行数:73,代码来源:RenderEntityThrown.java


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