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


Java GlStateManager.disableBlendProfile方法代碼示例

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


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

示例1: renderModel

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Renders the model in RenderLiving
 */
protected void renderModel(T entitylivingbaseIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor)
{
    boolean flag = !entitylivingbaseIn.isInvisible() || this.renderOutlines;
    boolean flag1 = !flag && !entitylivingbaseIn.isInvisibleToPlayer(Minecraft.getMinecraft().player);

    if (flag || flag1)
    {
        if (!this.bindEntityTexture(entitylivingbaseIn))
        {
            return;
        }

        if (flag1)
        {
            GlStateManager.enableBlendProfile(GlStateManager.Profile.TRANSPARENT_MODEL);
        }

        this.mainModel.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);

        if (flag1)
        {
            GlStateManager.disableBlendProfile(GlStateManager.Profile.TRANSPARENT_MODEL);
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:29,代碼來源:RenderLivingBase.java

示例2: renderModel

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Renders the model in RenderLiving
 */
protected void renderModel(T entitylivingbaseIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor)
{
    boolean flag = !entitylivingbaseIn.isInvisible() || this.renderOutlines;
    boolean flag1 = !flag && !entitylivingbaseIn.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer);

    if (flag || flag1)
    {
        if (!this.bindEntityTexture(entitylivingbaseIn))
        {
            return;
        }

        if (flag1)
        {
            GlStateManager.enableBlendProfile(GlStateManager.Profile.TRANSPARENT_MODEL);
        }

        this.mainModel.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);

        if (flag1)
        {
            GlStateManager.disableBlendProfile(GlStateManager.Profile.TRANSPARENT_MODEL);
        }
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:29,代碼來源:RenderLivingBase.java

示例3: doRender

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(AbstractClientPlayer entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Pre(entity, this, partialTicks, x, y, z))) return;
    if (!entity.isUser() || this.renderManager.renderViewEntity == entity)
    {
        double d0 = y;

        if (entity.isSneaking() && !(entity instanceof EntityPlayerSP))
        {
            d0 = y - 0.125D;
        }

        this.setModelVisibilities(entity);
        GlStateManager.enableBlendProfile(GlStateManager.Profile.PLAYER_SKIN);
        super.doRender(entity, x, d0, z, entityYaw, partialTicks);
        GlStateManager.disableBlendProfile(GlStateManager.Profile.PLAYER_SKIN);
    }
    net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Post(entity, this, partialTicks, x, y, z));
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:23,代碼來源:RenderPlayer.java

示例4: doRender

import net.minecraft.client.renderer.GlStateManager; //導入方法依賴的package包/類
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(AbstractClientPlayer entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    if (!entity.isUser() || this.renderManager.renderViewEntity == entity)
    {
        double d0 = y;

        if (entity.isSneaking() && !(entity instanceof EntityPlayerSP))
        {
            d0 = y - 0.125D;
        }

        this.setModelVisibilities(entity);
        
        GlStateManager.enableBlendProfile(GlStateManager.Profile.PLAYER_SKIN);
        if (Hacks.findMod(Chams.class).isEnabled()) {
        	GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL);
        	GlStateManager.enablePolygonOffset();
        	GlStateManager.doPolygonOffset(1.0F, -1000000);
        	super.doRender(entity, x, d0, z, entityYaw, partialTicks);
        	GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL);
        	GlStateManager.doPolygonOffset(1.0F, 1000000);
        	GlStateManager.disablePolygonOffset();
        }else{
        	super.doRender(entity, x, d0, z, entityYaw, partialTicks);
        }
        
        GlStateManager.disableBlendProfile(GlStateManager.Profile.PLAYER_SKIN);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:33,代碼來源:RenderPlayer.java


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