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


Java GlStateManager.pushMatrix方法代码示例

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


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

示例1: doRenderLayer

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void doRenderLayer(AbstractClientPlayer 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)
{
    if (entitylivingbaseIn.getName().equals("deadmau5") && entitylivingbaseIn.hasSkin() && !entitylivingbaseIn.isInvisible())
    {
        this.playerRenderer.bindTexture(entitylivingbaseIn.getLocationSkin());

        for (int i = 0; i < 2; ++i)
        {
            float f = entitylivingbaseIn.prevRotationYaw + (entitylivingbaseIn.rotationYaw - entitylivingbaseIn.prevRotationYaw) * partialTicks - (entitylivingbaseIn.prevRenderYawOffset + (entitylivingbaseIn.renderYawOffset - entitylivingbaseIn.prevRenderYawOffset) * partialTicks);
            float f1 = entitylivingbaseIn.prevRotationPitch + (entitylivingbaseIn.rotationPitch - entitylivingbaseIn.prevRotationPitch) * partialTicks;
            GlStateManager.pushMatrix();
            GlStateManager.rotate(f, 0.0F, 1.0F, 0.0F);
            GlStateManager.rotate(f1, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.375F * (float)(i * 2 - 1), 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -0.375F, 0.0F);
            GlStateManager.rotate(-f1, 1.0F, 0.0F, 0.0F);
            GlStateManager.rotate(-f, 0.0F, 1.0F, 0.0F);
            float f2 = 1.3333334F;
            GlStateManager.scale(f2, f2, f2);
            this.playerRenderer.getMainModel().renderDeadmau5Head(0.0625F);
            GlStateManager.popMatrix();
        }
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:25,代码来源:LayerDeadmau5Head.java

示例2: renderShulkerBox

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void renderShulkerBox(int color, float lidProgress) {
	GlStateManager.enableDepth();
	GlStateManager.depthFunc(515);
	GlStateManager.depthMask(true);
	GlStateManager.disableCull();
	RenderUtils.bindTexture(RenderShulker.SHULKER_ENDERGOLEM_TEXTURE[color]);
	GlStateManager.pushMatrix();
	GlStateManager.enableRescaleNormal();
	GlStateManager.translate(0 + 0.5F, 0 + 1.5F, 0 + 0.5F);
	GlStateManager.scale(1.0F, -1.0F, -1.0F);
	GlStateManager.translate(0.0F, 1.0F, 0.0F);
	GlStateManager.scale(0.9995F, 0.9995F, 0.9995F);
	GlStateManager.translate(0.0F, -1.0F, 0.0F);
	SHULKER_BOX_MODEL.base.render(0.0625F);
	GlStateManager.translate(0.0F, -lidProgress * 0.5F, 0.0F);
	GlStateManager.rotate(270.0F * lidProgress, 0.0F, 1.0F, 0.0F);
	SHULKER_BOX_MODEL.lid.render(0.0625F);
	GlStateManager.enableCull();
	GlStateManager.disableRescaleNormal();
	GlStateManager.popMatrix();
	GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
}
 
开发者ID:p455w0rd,项目名称:EndermanEvolution,代码行数:23,代码来源:CustomChestRenderer.java

示例3: render2

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
@Override
public void render2(int dy, float ix, float iy) {
    ix = (float) (ix * 2048 * 1.2 - 125);
    iy = (float) (iy * 2048 * 1.08 - 105);
    if (ix >= x && ix <= x+w && iy >= (y + dy) && iy <= y+dy+h) {
        RenderHelper.enableGUIStandardItemLighting();
        GlStateManager.pushMatrix();
        GlStateManager.scale(6.0, 6.0, 0.0);
        GlStateManager.translate(ix / 6.5, iy / 6.5, 0);
        renderToolTip(item, 0, 0);
        GlStateManager.popMatrix();
        RenderHelper.disableStandardItemLighting();
    }
}
 
开发者ID:McJty,项目名称:Lector,代码行数:15,代码来源:RenderElementItem.java

示例4: renderCrystalBeams

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void renderCrystalBeams(double p_188325_0_, double p_188325_2_, double p_188325_4_, float p_188325_6_, double p_188325_7_, double p_188325_9_, double p_188325_11_, int p_188325_13_, double p_188325_14_, double p_188325_16_, double p_188325_18_)
{
    float f = (float)(p_188325_14_ - p_188325_7_);
    float f1 = (float)(p_188325_16_ - 1.0D - p_188325_9_);
    float f2 = (float)(p_188325_18_ - p_188325_11_);
    float f3 = MathHelper.sqrt_float(f * f + f2 * f2);
    float f4 = MathHelper.sqrt_float(f * f + f1 * f1 + f2 * f2);
    GlStateManager.pushMatrix();
    GlStateManager.translate((float)p_188325_0_, (float)p_188325_2_ + 2.0F, (float)p_188325_4_);
    GlStateManager.rotate((float)(-Math.atan2((double)f2, (double)f)) * (180F / (float)Math.PI) - 90.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate((float)(-Math.atan2((double)f3, (double)f1)) * (180F / (float)Math.PI) - 90.0F, 1.0F, 0.0F, 0.0F);
    Tessellator tessellator = Tessellator.getInstance();
    VertexBuffer vertexbuffer = tessellator.getBuffer();
    RenderHelper.disableStandardItemLighting();
    GlStateManager.disableCull();
    GlStateManager.shadeModel(7425);
    float f5 = 0.0F - ((float)p_188325_13_ + p_188325_6_) * 0.01F;
    float f6 = MathHelper.sqrt_float(f * f + f1 * f1 + f2 * f2) / 32.0F - ((float)p_188325_13_ + p_188325_6_) * 0.01F;
    vertexbuffer.begin(5, DefaultVertexFormats.POSITION_TEX_COLOR);
    int i = 8;

    for (int j = 0; j <= 8; ++j)
    {
        float f7 = MathHelper.sin((float)(j % 8) * ((float)Math.PI * 2F) / 8.0F) * 0.75F;
        float f8 = MathHelper.cos((float)(j % 8) * ((float)Math.PI * 2F) / 8.0F) * 0.75F;
        float f9 = (float)(j % 8) / 8.0F;
        vertexbuffer.pos((double)(f7 * 0.2F), (double)(f8 * 0.2F), 0.0D).tex((double)f9, (double)f5).color(0, 0, 0, 255).endVertex();
        vertexbuffer.pos((double)f7, (double)f8, (double)f4).tex((double)f9, (double)f6).color(255, 255, 255, 255).endVertex();
    }

    tessellator.draw();
    GlStateManager.enableCull();
    GlStateManager.shadeModel(7424);
    RenderHelper.enableStandardItemLighting();
    GlStateManager.popMatrix();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:37,代码来源:RenderDragon.java

示例5: render

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * Sets the models various rotation angles then renders the model.
 */
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
{
    super.render(entityIn, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale);
    this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn);

    if (this.isChild)
    {
        float f = 2.0F;
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 5.0F * scale, 2.0F * scale);
        this.wolfHeadMain.renderWithRotation(scale);
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        GlStateManager.scale(1.0F / f, 1.0F / f, 1.0F / f);
        GlStateManager.translate(0.0F, 24.0F * scale, 0.0F);
        this.wolfBody.render(scale);
        this.wolfLeg1.render(scale);
        this.wolfLeg2.render(scale);
        this.wolfLeg3.render(scale);
        this.wolfLeg4.render(scale);
        this.wolfTail.renderWithRotation(scale);
        this.wolfMane.render(scale);
        GlStateManager.popMatrix();
    }
    else
    {
        this.wolfHeadMain.renderWithRotation(scale);
        this.wolfBody.render(scale);
        this.wolfLeg1.render(scale);
        this.wolfLeg2.render(scale);
        this.wolfLeg3.render(scale);
        this.wolfLeg4.render(scale);
        this.wolfTail.renderWithRotation(scale);
        this.wolfMane.render(scale);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:40,代码来源:ModelWolf.java

示例6: onRenderGameOverlay

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
@SubscribeEvent
public void onRenderGameOverlay(RenderGameOverlayEvent.Post event) {
	if (event.getType() == RenderGameOverlayEvent.ElementType.PORTAL) {
		Minecraft mc = Minecraft.getMinecraft();
		if (isKnockedOut) {
			GlStateManager.pushMatrix();
			GlStateManager.translate(0, 0, -300);
			GuiHelper.drawGradientRectW(0, 0, mc.displayWidth, mc.displayHeight, 0x60500000, 0x90FF0000);
			GlStateManager.popMatrix();
			if (mc.currentScreen == null) {
				mc.fontRenderer.drawStringWithShadow(I18n.format("gui.hardcorerevival.open_death_screen", mc.gameSettings.keyBindChat.getDisplayName()), 5, 5, 0xFFFFFFFF);
				mc.fontRenderer.drawString(I18n.format("gui.hardcorerevival.rescue_time_left", Math.max(0, (ModConfig.maxDeathTicks - deathTime) / 20)), 5, 7 + mc.fontRenderer.FONT_HEIGHT, 16777215);
				mc.getTextureManager().bindTexture(Gui.ICONS);
			}
		} else {
			if(targetEntity != -1) {
				Entity entity = mc.world.getEntityByID(targetEntity);
				if (entity instanceof EntityPlayer) {
					String s = I18n.format("gui.hardcorerevival.rescuing", ((EntityPlayer) entity).getDisplayNameString());
					if(targetProgress >= 0.75f) {
						s += " ...";
					} else if(targetProgress >= 0.5f) {
						s += " ..";
					} else if(targetProgress >= 0.25f) {
						s += " .";
					}
					mc.fontRenderer.drawString(s, event.getResolution().getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(s) / 2, event.getResolution().getScaledHeight() / 2 + 30, 0xFFFFFFFF);
					mc.getTextureManager().bindTexture(Gui.ICONS);
				}
			}
		}
	} else if(event.getType() == RenderGameOverlayEvent.ElementType.CHAT) {
		if(prevChatHeight != -1f) {
			Minecraft.getMinecraft().gameSettings.chatHeightFocused = prevChatHeight;
		}
	}
}
 
开发者ID:blay09,项目名称:HardcoreRevival,代码行数:38,代码来源:ClientProxy.java

示例7: render

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * Sets the models various rotation angles then renders the model.
 */
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entityIn);

    if (this.isChild)
    {
        float f = 2.0F;
        GlStateManager.pushMatrix();
        GlStateManager.scale(0.75F, 0.75F, 0.75F);
        GlStateManager.translate(0.0F, 10.0F * scale, 4.0F * scale);
        this.ocelotHead.render(scale);
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        GlStateManager.scale(0.5F, 0.5F, 0.5F);
        GlStateManager.translate(0.0F, 24.0F * scale, 0.0F);
        this.ocelotBody.render(scale);
        this.ocelotBackLeftLeg.render(scale);
        this.ocelotBackRightLeg.render(scale);
        this.ocelotFrontLeftLeg.render(scale);
        this.ocelotFrontRightLeg.render(scale);
        this.ocelotTail.render(scale);
        this.ocelotTail2.render(scale);
        GlStateManager.popMatrix();
    }
    else
    {
        this.ocelotHead.render(scale);
        this.ocelotBody.render(scale);
        this.ocelotTail.render(scale);
        this.ocelotTail2.render(scale);
        this.ocelotBackLeftLeg.render(scale);
        this.ocelotBackRightLeg.render(scale);
        this.ocelotFrontLeftLeg.render(scale);
        this.ocelotFrontRightLeg.render(scale);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:40,代码来源:ModelOcelot.java

示例8: render

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 
    GlStateManager.pushMatrix();
    GlStateManager.translate(this.shape1.offsetX, this.shape1.offsetY, this.shape1.offsetZ);
    GlStateManager.translate(this.shape1.rotationPointX * f5, this.shape1.rotationPointY * f5, this.shape1.rotationPointZ * f5);
    GlStateManager.scale(1.0D, 1.0D, 0.5D);
    GlStateManager.translate(-this.shape1.offsetX, -this.shape1.offsetY, -this.shape1.offsetZ);
    GlStateManager.translate(-this.shape1.rotationPointX * f5, -this.shape1.rotationPointY * f5, -this.shape1.rotationPointZ * f5);
    this.shape1.render(f5);
    GlStateManager.popMatrix();
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:12,代码来源:ModelDoor.java

示例9: doRender

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(T entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    GlStateManager.translate((float)x, (float)y, (float)z);
    GlStateManager.enableRescaleNormal();
    GlStateManager.scale(0.5F, 0.5F, 0.5F);
    GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    this.bindTexture(TextureMap.locationBlocksTexture);
    this.field_177083_e.func_181564_a(this.func_177082_d(entity), ItemCameraTransforms.TransformType.GROUND);
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:21,代码来源:RenderSnowball.java

示例10: doRenderLayer

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void doRenderLayer(AbstractClientPlayer 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)
{
    if (entitylivingbaseIn.hasPlayerInfo() && !entitylivingbaseIn.isInvisible() && entitylivingbaseIn.isWearing(EnumPlayerModelParts.CAPE) && entitylivingbaseIn.getLocationCape() != null)
    {
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.playerRenderer.bindTexture(entitylivingbaseIn.getLocationCape());
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.0F, 0.125F);
        double d0 = entitylivingbaseIn.prevChasingPosX + (entitylivingbaseIn.chasingPosX - entitylivingbaseIn.prevChasingPosX) * (double)partialTicks - (entitylivingbaseIn.prevPosX + (entitylivingbaseIn.posX - entitylivingbaseIn.prevPosX) * (double)partialTicks);
        double d1 = entitylivingbaseIn.prevChasingPosY + (entitylivingbaseIn.chasingPosY - entitylivingbaseIn.prevChasingPosY) * (double)partialTicks - (entitylivingbaseIn.prevPosY + (entitylivingbaseIn.posY - entitylivingbaseIn.prevPosY) * (double)partialTicks);
        double d2 = entitylivingbaseIn.prevChasingPosZ + (entitylivingbaseIn.chasingPosZ - entitylivingbaseIn.prevChasingPosZ) * (double)partialTicks - (entitylivingbaseIn.prevPosZ + (entitylivingbaseIn.posZ - entitylivingbaseIn.prevPosZ) * (double)partialTicks);
        float f = entitylivingbaseIn.prevRenderYawOffset + (entitylivingbaseIn.renderYawOffset - entitylivingbaseIn.prevRenderYawOffset) * partialTicks;
        double d3 = (double)MathHelper.sin(f * (float)Math.PI / 180.0F);
        double d4 = (double)(-MathHelper.cos(f * (float)Math.PI / 180.0F));
        float f1 = (float)d1 * 10.0F;
        f1 = MathHelper.clamp_float(f1, -6.0F, 32.0F);
        float f2 = (float)(d0 * d3 + d2 * d4) * 100.0F;
        float f3 = (float)(d0 * d4 - d2 * d3) * 100.0F;

        if (f2 < 0.0F)
        {
            f2 = 0.0F;
        }

        float f4 = entitylivingbaseIn.prevCameraYaw + (entitylivingbaseIn.cameraYaw - entitylivingbaseIn.prevCameraYaw) * partialTicks;
        f1 = f1 + MathHelper.sin((entitylivingbaseIn.prevDistanceWalkedModified + (entitylivingbaseIn.distanceWalkedModified - entitylivingbaseIn.prevDistanceWalkedModified) * partialTicks) * 6.0F) * 32.0F * f4;

        if (entitylivingbaseIn.isSneaking())
        {
            f1 += 25.0F;
        }

        GlStateManager.rotate(6.0F + f2 / 2.0F + f1, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(f3 / 2.0F, 0.0F, 0.0F, 1.0F);
        GlStateManager.rotate(-f3 / 2.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
        this.playerRenderer.getMainModel().renderCape(0.0625F);
        GlStateManager.popMatrix();
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:41,代码来源:LayerCape.java

示例11: renderShelf

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void renderShelf(TileEntityDisplay te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
	EnumFacing facing = te.getWorld().getBlockState(te.getPos()).getValue(BlockHorizontal.FACING);

	for (int i = 0; i < 4; ++i) {
		if (!te.getStackInSlot(i).isEmpty()) {
			EntityItem customItem = new EntityItem(te.getWorld());
			customItem.hoverStart = 0.0F;
			customItem.setItem(te.getStackInSlot(i));
			GlStateManager.pushMatrix();
			GlStateManager.translate((float) x, (float) y, (float) z);
			if (facing == EnumFacing.NORTH || facing == EnumFacing.SOUTH) {
				if (i < 2) {
					GlStateManager.translate(0.25F + (0.5F * i), 0.5F, 0.5F);
				} else {
					GlStateManager.translate(0.25F + (0.5F * (i - 2)), 0F, 0.5F);
				}
			} else {
				if (i < 2) {
					GlStateManager.translate(0.5F, 0.5F, 0.75F - (0.5F * i));
				} else {
					GlStateManager.translate(0.5F, 0F, 0.75F - (0.5F * (i - 2)));
				}
			}

			if (ConfigHandler.laidDownShelves && !(te.getStackInSlot(i).getItem() instanceof ItemBlock)) {
				GlStateManager.rotate(-90, 1, 0, 0);

				GlStateManager.translate(0, -0.25, 0.075);
			}

			GlStateManager.rotate(90 * facing.getOpposite().getHorizontalIndex(), 0.0F, 1.0F, 0.0F);

			GlStateManager.scale(0.7F, 0.7F, 0.7F);

			itemRender.doRender(customItem, 0, 0, 0, 0, 0);
			GlStateManager.popMatrix();
		}
	}
}
 
开发者ID:Zundrel,项目名称:Never-Enough-Currency,代码行数:40,代码来源:TileEntityRenderDisplay.java

示例12: render

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
@Override
public void render()
{
    super.render();
    GlStateManager.pushMatrix();
    GlStateManager.translate(0, 0, 0);
    String s = I18n.format("misc.gui.multiblock_showcase.requiredTier", ItemTinkeringKit.getTierDisplayName(multiblock.getTier()));
    DrawingTools.drawString(s, getWidth() - DrawingTools.measureString(s), getHeight() - DrawingTools.getStringHeight(s), Colors.WHITE);
    GlStateManager.popMatrix();
}
 
开发者ID:PearXTeam,项目名称:PurificatiMagicae,代码行数:11,代码来源:PMMultiblockShowcase.java

示例13: drawEntityOnScreen

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void drawEntityOnScreen(int posX, int posY, int scale, EntityLivingBase ent) {
	GlStateManager.enableColorMaterial();
	GlStateManager.pushMatrix();
	GlStateManager.translate(posX, posY, 50.0F);
	GlStateManager.scale((-scale), scale, scale);
	GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F);
	float f = ent.renderYawOffset;
	float f1 = ent.rotationYaw;
	float f2 = ent.rotationPitch;
	float f3 = ent.prevRotationYawHead;
	float f4 = ent.rotationYawHead;
	GlStateManager.rotate(135.0F, 0.0F, 1.0F, 0.0F);
	RenderHelper.enableStandardItemLighting();
	GlStateManager.rotate(-135.0F, 0.0F, 1.0F, 0.0F);
	ent.renderYawOffset = 0;
	ent.rotationYaw = 0;
	ent.rotationPitch = 0;
	ent.rotationYawHead = ent.rotationYaw;
	ent.prevRotationYawHead = ent.rotationYaw;
	GlStateManager.translate(0.0F, 0.0F, 0.0F);
	RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
	rendermanager.setPlayerViewY(180.0F);
	rendermanager.setRenderShadow(false);
	rendermanager.doRenderEntity(ent, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F, false);
	rendermanager.setRenderShadow(true);
	ent.renderYawOffset = f;
	ent.rotationYaw = f1;
	ent.rotationPitch = f2;
	ent.prevRotationYawHead = f3;
	ent.rotationYawHead = f4;
	GlStateManager.popMatrix();
	RenderHelper.disableStandardItemLighting();
	GlStateManager.disableRescaleNormal();
	GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
	GlStateManager.disableTexture2D();
	GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:38,代码来源:GuiDisguiseKit.java

示例14: renderTileEntityAt

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void renderTileEntityAt(TileEntityEnchantmentTable te, double x, double y, double z, float partialTicks, int destroyStage)
{
    GlStateManager.pushMatrix();
    GlStateManager.translate((float)x + 0.5F, (float)y + 0.75F, (float)z + 0.5F);
    float f = (float)te.tickCount + partialTicks;
    GlStateManager.translate(0.0F, 0.1F + MathHelper.sin(f * 0.1F) * 0.01F, 0.0F);
    float f1;

    for (f1 = te.bookRotation - te.bookRotationPrev; f1 >= (float)Math.PI; f1 -= ((float)Math.PI * 2F))
    {
        ;
    }

    while (f1 < -(float)Math.PI)
    {
        f1 += ((float)Math.PI * 2F);
    }

    float f2 = te.bookRotationPrev + f1 * partialTicks;
    GlStateManager.rotate(-f2 * 180.0F / (float)Math.PI, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(80.0F, 0.0F, 0.0F, 1.0F);
    this.bindTexture(TEXTURE_BOOK);
    float f3 = te.pageFlipPrev + (te.pageFlip - te.pageFlipPrev) * partialTicks + 0.25F;
    float f4 = te.pageFlipPrev + (te.pageFlip - te.pageFlipPrev) * partialTicks + 0.75F;
    f3 = (f3 - (float)MathHelper.truncateDoubleToInt((double)f3)) * 1.6F - 0.3F;
    f4 = (f4 - (float)MathHelper.truncateDoubleToInt((double)f4)) * 1.6F - 0.3F;

    if (f3 < 0.0F)
    {
        f3 = 0.0F;
    }

    if (f4 < 0.0F)
    {
        f4 = 0.0F;
    }

    if (f3 > 1.0F)
    {
        f3 = 1.0F;
    }

    if (f4 > 1.0F)
    {
        f4 = 1.0F;
    }

    float f5 = te.bookSpreadPrev + (te.bookSpread - te.bookSpreadPrev) * partialTicks;
    GlStateManager.enableCull();
    this.field_147541_c.render((Entity)null, f, f3, f4, f5, 0.0F, 0.0625F);
    GlStateManager.popMatrix();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:53,代码来源:TileEntityEnchantmentTableRenderer.java

示例15: renderModel

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void renderModel(double x, double y, double z, float partialTicks) {
	int tick = (int) Minecraft.getMinecraft().world.getTotalWorldTime();
	GlStateManager.pushMatrix();
	GlStateManager.disableCull();
	GlStateManager.translate(x + 0.5D, y + 0.5D, z + 0.5D);
	GlStateManager.rotate(tick % 360, 0, 1, tick % 720);
	GlStateManager.rotate(30.0f * (float) Math.sin(Math.toRadians(partialTicks / 15f + tick / 15 % 360)), 1, 0, 0);

	for(int layer = 0; layer < 3; layer++) {
		float relativeTime = ((float) tick - ((float) layer * 145F)) * 0.05F;

		float size = MathHelper.sin(relativeTime);
		size = (size < 0 ? -size : size);
		size += 0.2F;
		size *= 0.4F;

		double uvMin = 0.3125D;
		SpriteLibrary.GRAVITY_INHIBITOR.bindManager();
		RenderHelper.renderCube(size, uvMin, 1 - uvMin, uvMin, 1 - uvMin);

		SpriteLibrary.GRAVITY_INHIBITOR_OVERLAY.bindManager();
		Tuple<Double, Double> uv = SpriteLibrary.GRAVITY_INHIBITOR_OVERLAY.getUVFrame((int) ((float) tick * 0.45F));
		double uOffset = SpriteLibrary.GRAVITY_INHIBITOR_OVERLAY.getU();
		double u = uv.getFirst();
		double vOffset = SpriteLibrary.GRAVITY_INHIBITOR_OVERLAY.getV();
		double v = uv.getSecond();

		double uMin = u + uvMin / 2F;
		double uMax = u + uOffset - uvMin / 2F;
		double vMin = v + uvMin / 4F;
		double vMax = v + vOffset - uvMin / 4F;

		final float prevU = OpenGlHelper.lastBrightnessX;
		final float prevV = OpenGlHelper.lastBrightnessY;
		GlStateManager.disableLighting();
		GLHelper.lightMap(255F, 255F);
		RenderHelper.renderCube(size, uMin, uMax, vMin, vMax);
		GLHelper.lightMap(prevU, prevV);
		GlStateManager.enableLighting();
	}

	GlStateManager.enableCull();
	GlStateManager.popMatrix();
}
 
开发者ID:ArekkuusuJerii,项目名称:Solar,代码行数:45,代码来源:GravityInhibitorRenderer.java


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