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


Java GlStateManager.disableRescaleNormal方法代碼示例

本文整理匯總了Java中net.minecraft.client.renderer.GlStateManager.disableRescaleNormal方法的典型用法代碼示例。如果您正苦於以下問題:Java GlStateManager.disableRescaleNormal方法的具體用法?Java GlStateManager.disableRescaleNormal怎麽用?Java GlStateManager.disableRescaleNormal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.client.renderer.GlStateManager的用法示例。


在下文中一共展示了GlStateManager.disableRescaleNormal方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: doRenderLayer

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void doRenderLayer(EntityEnderman 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(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);
        this.endermanRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:27,代碼來源:LayerHeldBlock.java

示例2: 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(EntityPainting entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    GlStateManager.translate(x, y, z);
    GlStateManager.rotate(180.0F - entityYaw, 0.0F, 1.0F, 0.0F);
    GlStateManager.enableRescaleNormal();
    this.bindEntityTexture(entity);
    EntityPainting.EnumArt entitypainting$enumart = entity.art;
    float f = 0.0625F;
    GlStateManager.scale(f, f, f);
    this.renderPainting(entity, entitypainting$enumart.sizeX, entitypainting$enumart.sizeY, entitypainting$enumart.offsetX, entitypainting$enumart.offsetY);
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:22,代碼來源:RenderPainting.java

示例3: renderShulkerBox

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
public static void renderShulkerBox(ItemStack stack, float lidProgress) {
	ModelShulker shulkerBoxModel = new ModelShulker();
	GlStateManager.enableDepth();
	GlStateManager.depthFunc(515);
	GlStateManager.depthMask(true);
	GlStateManager.disableCull();
	String color = getShulkerColorName(stack);
	RenderUtils.bindTexture(new ResourceLocation("ironchest", "textures/model/shulker/" + color + "/shulker_" + color + "" + getShulkerBoxType(stack).modelTexture));
	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);
	shulkerBoxModel.base.render(0.0625F);
	GlStateManager.translate(0.0F, -lidProgress * 0.5F, 0.0F);
	GlStateManager.rotate(270.0F * lidProgress, 0.0F, 1.0F, 0.0F);
	shulkerBoxModel.lid.render(0.0625F);
	GlStateManager.enableCull();
	GlStateManager.disableRescaleNormal();
	GlStateManager.popMatrix();
	GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
}
 
開發者ID:p455w0rd,項目名稱:EndermanEvolution,代碼行數:26,代碼來源:IronChests.java

示例4: renderItemIntoGUI

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void renderItemIntoGUI(ItemStack stack, int x, int y)
{
    IBakedModel ibakedmodel = this.itemModelMesher.getItemModel(stack);
    GlStateManager.pushMatrix();
    this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
    this.textureManager.getTexture(TextureMap.locationBlocksTexture).setBlurMipmap(false, false);
    GlStateManager.enableRescaleNormal();
    GlStateManager.enableAlpha();
    GlStateManager.alphaFunc(516, 0.1F);
    GlStateManager.enableBlend();
    GlStateManager.blendFunc(770, 771);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.setupGuiTransform(x, y, ibakedmodel.isGui3d());
    ibakedmodel.getItemCameraTransforms().applyTransform(ItemCameraTransforms.TransformType.GUI);
    this.renderItem(stack, ibakedmodel);
    GlStateManager.disableAlpha();
    GlStateManager.disableRescaleNormal();
    GlStateManager.disableLighting();
    GlStateManager.popMatrix();
    this.textureManager.bindTexture(TextureMap.locationBlocksTexture);
    this.textureManager.getTexture(TextureMap.locationBlocksTexture).restoreLastBlurMipmap();
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:23,代碼來源:RenderItem.java

示例5: doRenderLayer

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
public void doRenderLayer(EntityIronGolem 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.getHoldRoseTick() != 0)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
        float f = 0.5F;
        GlStateManager.scale(f, -f, f);
        int i = entitylivingbaseIn.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);
        this.ironGolemRenderer.bindTexture(TextureMap.locationBlocksTexture);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_flower.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:24,代碼來源:LayerIronGolemFlower.java

示例6: drawItem

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
private void drawItem(int x, int z, ItemStack itemToDraw)
{
    this.drawItemBackground(x + 1, z + 1);
    GlStateManager.enableRescaleNormal();

    if (!itemToDraw.func_190926_b())
    {
        RenderHelper.enableGUIStandardItemLighting();
        GuiCreateFlatWorld.this.itemRender.renderItemIntoGUI(itemToDraw, x + 2, z + 2);
        RenderHelper.disableStandardItemLighting();
    }

    GlStateManager.disableRescaleNormal();
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:15,代碼來源:GuiCreateFlatWorld.java

示例7: doRender

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
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.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(getEntityTexture(entity));

	if (this.renderOutlines) {
		GlStateManager.enableColorMaterial();
		GlStateManager.enableOutlineMode(this.getTeamColor(entity));
	}

	this.itemRenderer.renderItem(this.getStackToRender(entity), ItemCameraTransforms.TransformType.GROUND);

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

	GlStateManager.disableRescaleNormal();
	GlStateManager.popMatrix();
	super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
開發者ID:the-realest-stu,項目名稱:Adventurers-Toolbox,代碼行數:28,代碼來源:RenderProjectileItem.java

示例8: doRender

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityPainting entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    GlStateManager.translate(x, y, z);
    GlStateManager.rotate(180.0F - entityYaw, 0.0F, 1.0F, 0.0F);
    GlStateManager.enableRescaleNormal();
    this.bindEntityTexture(entity);
    EntityPainting.EnumArt entitypainting$enumart = entity.art;
    float f = 0.0625F;
    GlStateManager.scale(0.0625F, 0.0625F, 0.0625F);

    if (this.renderOutlines)
    {
        GlStateManager.enableColorMaterial();
        GlStateManager.enableOutlineMode(this.getTeamColor(entity));
    }

    this.renderPainting(entity, entitypainting$enumart.sizeX, entitypainting$enumart.sizeY, entitypainting$enumart.offsetX, entitypainting$enumart.offsetY);

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

    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:33,代碼來源:RenderPainting.java

示例9: func_178054_a

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
private void func_178054_a(int p_178054_1_, int p_178054_2_, Item p_178054_3_, int p_178054_4_)
{
    this.func_148173_e(p_178054_1_ + 1, p_178054_2_ + 1);
    GlStateManager.enableRescaleNormal();
    RenderHelper.enableGUIStandardItemLighting();
    GuiFlatPresets.this.itemRender.renderItemIntoGUI(new ItemStack(p_178054_3_, 1, p_178054_4_), p_178054_1_ + 2, p_178054_2_ + 2);
    RenderHelper.disableStandardItemLighting();
    GlStateManager.disableRescaleNormal();
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:10,代碼來源:GuiFlatPresets.java

示例10: render

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
@Override
public void render(TileEntityXPBlock te, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
	if(GlobalXP.config.renderNameplate)
	{
		ITextComponent levelsText = new TextComponentString((int)te.getStoredLevels() + " (" + te.getStoredXP() + ")");

		if(te != null && te.getPos() != null && rendererDispatcher.cameraHitResult != null && rendererDispatcher.cameraHitResult.getBlockPos() != null && rendererDispatcher.cameraHitResult.getBlockPos().equals(te.getPos()))
		{
			setLightmapDisabled(true);
			drawNameplate(te, levelsText.getFormattedText(), x, y, z, 12);
			setLightmapDisabled(false);
		}
	}

	double offset = Math.sin((te.getWorld().getTotalWorldTime() + partialTicks) * GlobalXP.config.bobSpeed / 8.0D) / 10.0D;
	IBakedModel model = Minecraft.getMinecraft().getRenderItem().getItemModelWithOverrides(emerald, te.getWorld(), null);

	GlStateManager.enableRescaleNormal();
	GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F);
	GlStateManager.enableBlend();
	RenderHelper.enableStandardItemLighting();
	GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
	GlStateManager.pushMatrix();
	GlStateManager.translate(x + 0.5D, y + 0.4D + offset, z + 0.5D);
	GlStateManager.rotate((te.getWorld().getTotalWorldTime() + partialTicks) * 4.0F * (float)GlobalXP.config.spinSpeed, 0.0F, 1.0F, 0.0F);
	model = ForgeHooksClient.handleCameraTransforms(model, TransformType.GROUND, false);
	Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
	Minecraft.getMinecraft().getRenderItem().renderItem(emerald, model);
	GlStateManager.popMatrix();
	GlStateManager.disableRescaleNormal();
	GlStateManager.disableBlend();
}
 
開發者ID:bl4ckscor3,項目名稱:GlobalXP,代碼行數:34,代碼來源:TileEntityXPBlockRenderer.java

示例11: drawEntityOnScreen

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Draws an entity on the screen looking toward the cursor.
 */
public static void drawEntityOnScreen(int posX, int posY, int scale, float mouseX, float mouseY, EntityLivingBase ent)
{
    GlStateManager.enableColorMaterial();
    GlStateManager.pushMatrix();
    GlStateManager.translate((float)posX, (float)posY, 50.0F);
    GlStateManager.scale((float)(-scale), (float)scale, (float)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);
    GlStateManager.rotate(-((float)Math.atan((double)(mouseY / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F);
    ent.renderYawOffset = (float)Math.atan((double)(mouseX / 40.0F)) * 20.0F;
    ent.rotationYaw = (float)Math.atan((double)(mouseX / 40.0F)) * 40.0F;
    ent.rotationPitch = -((float)Math.atan((double)(mouseY / 40.0F))) * 20.0F;
    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:F1r3w477,項目名稱:CustomWorldGen,代碼行數:43,代碼來源:GuiInventory.java

示例12: drawEntityOnScreen

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Draws the entity to the screen. Args: xPos, yPos, scale, mouseX, mouseY, entityLiving
 */
public static void drawEntityOnScreen(int posX, int posY, int scale, float mouseX, float mouseY, EntityLivingBase ent)
{
    GlStateManager.enableColorMaterial();
    GlStateManager.pushMatrix();
    GlStateManager.translate((float)posX, (float)posY, 50.0F);
    GlStateManager.scale((float)(-scale), (float)scale, (float)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);
    GlStateManager.rotate(-((float)Math.atan((double)(mouseY / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F);
    ent.renderYawOffset = (float)Math.atan((double)(mouseX / 40.0F)) * 20.0F;
    ent.rotationYaw = (float)Math.atan((double)(mouseX / 40.0F)) * 40.0F;
    ent.rotationPitch = -((float)Math.atan((double)(mouseY / 40.0F))) * 20.0F;
    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.renderEntityWithPosYaw(ent, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
    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:Notoh,項目名稱:DecompiledMinecraft,代碼行數:43,代碼來源:GuiInventory.java

示例13: 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

示例14: renderEquippedItems

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
protected void renderEquippedItems(EntityLivingBase p_renderEquippedItems_1_, float p_renderEquippedItems_2_, float p_renderEquippedItems_3_)
{
    if (p_renderEquippedItems_1_ instanceof AbstractClientPlayer)
    {
        AbstractClientPlayer abstractclientplayer = (AbstractClientPlayer)p_renderEquippedItems_1_;
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.disableRescaleNormal();
        ModelBiped modelbiped = (ModelBiped)this.mainModel;
        PlayerConfigurations.renderPlayerItems(modelbiped, abstractclientplayer, p_renderEquippedItems_2_, p_renderEquippedItems_3_);
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:12,代碼來源:RenderPlayerOF.java

示例15: 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(EntityXPOrb entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    GlStateManager.translate((float)x, (float)y, (float)z);
    this.bindEntityTexture(entity);
    int i = entity.getTextureByXP();
    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;
    float f4 = 1.0F;
    float f5 = 0.5F;
    float f6 = 0.25F;
    int j = entity.getBrightnessForRender(partialTicks);
    int k = j % 65536;
    int l = j / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)k / 1.0F, (float)l / 1.0F);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    float f7 = 255.0F;
    float f8 = ((float)entity.xpColor + partialTicks) / 2.0F;
    l = (int)((MathHelper.sin(f8 + 0.0F) + 1.0F) * 0.5F * 255.0F);
    boolean flag = true;
    int i1 = (int)((MathHelper.sin(f8 + 4.1887903F) + 1.0F) * 0.1F * 255.0F);
    GlStateManager.rotate(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    float f9 = 0.3F;
    GlStateManager.scale(0.3F, 0.3F, 0.3F);
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
    int j1 = l;
    int k1 = 255;
    int l1 = i1;

    if (Config.isCustomColors())
    {
        int i2 = CustomColors.getXpOrbColor(f8);

        if (i2 >= 0)
        {
            j1 = i2 >> 16 & 255;
            k1 = i2 >> 8 & 255;
            l1 = i2 >> 0 & 255;
        }
    }

    worldrenderer.pos((double)(0.0F - f5), (double)(0.0F - f6), 0.0D).tex((double)f, (double)f3).color(j1, k1, l1, 128).normal(0.0F, 1.0F, 0.0F).endVertex();
    worldrenderer.pos((double)(f4 - f5), (double)(0.0F - f6), 0.0D).tex((double)f1, (double)f3).color(j1, k1, l1, 128).normal(0.0F, 1.0F, 0.0F).endVertex();
    worldrenderer.pos((double)(f4 - f5), (double)(1.0F - f6), 0.0D).tex((double)f1, (double)f2).color(j1, k1, l1, 128).normal(0.0F, 1.0F, 0.0F).endVertex();
    worldrenderer.pos((double)(0.0F - f5), (double)(1.0F - f6), 0.0D).tex((double)f, (double)f2).color(j1, k1, l1, 128).normal(0.0F, 1.0F, 0.0F).endVertex();
    tessellator.draw();
    GlStateManager.disableBlend();
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:63,代碼來源:RenderXPOrb.java


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