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


Java AbstractClientPlayer.isPlayerInfoSet方法代码示例

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


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

示例1: doRenderLayer

import net.minecraft.client.entity.AbstractClientPlayer; //导入方法依赖的package包/类
public void doRenderLayer(AbstractClientPlayer entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    ItemStack itemstack = entitylivingbaseIn.getItemStackFromSlot(EntityEquipmentSlot.CHEST);

    if (itemstack != null && itemstack.getItem() == Items.ELYTRA)
    {
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.enableBlend();

        if (entitylivingbaseIn.isPlayerInfoSet() && entitylivingbaseIn.getLocationElytra() != null)
        {
            this.renderPlayer.bindTexture(entitylivingbaseIn.getLocationElytra());
        }
        else if (entitylivingbaseIn.hasPlayerInfo() && entitylivingbaseIn.getLocationCape() != null && entitylivingbaseIn.isWearing(EnumPlayerModelParts.CAPE))
        {
            this.renderPlayer.bindTexture(entitylivingbaseIn.getLocationCape());
        }
        else
        {
            this.renderPlayer.bindTexture(TEXTURE_ELYTRA);
        }

        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.0F, 0.125F);
        this.modelElytra.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entitylivingbaseIn);
        this.modelElytra.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);

        if (itemstack.isItemEnchanted())
        {
            LayerArmorBase.renderEnchantedGlint(this.renderPlayer, entitylivingbaseIn, this.modelElytra, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
        }

        GlStateManager.popMatrix();
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:36,代码来源:LayerElytra.java

示例2: doRenderLayer

import net.minecraft.client.entity.AbstractClientPlayer; //导入方法依赖的package包/类
public void doRenderLayer(EntityLivingBase entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    ItemStack itemstack = entitylivingbaseIn.getItemStackFromSlot(EntityEquipmentSlot.CHEST);

    if (itemstack.getItem() == Items.ELYTRA)
    {
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);

        if (entitylivingbaseIn instanceof AbstractClientPlayer)
        {
            AbstractClientPlayer abstractclientplayer = (AbstractClientPlayer)entitylivingbaseIn;

            if (abstractclientplayer.isPlayerInfoSet() && abstractclientplayer.getLocationElytra() != null)
            {
                this.renderPlayer.bindTexture(abstractclientplayer.getLocationElytra());
            }
            else if (abstractclientplayer.hasElytraCape() && abstractclientplayer.hasPlayerInfo() && abstractclientplayer.getLocationCape() != null && abstractclientplayer.isWearing(EnumPlayerModelParts.CAPE))
            {
                this.renderPlayer.bindTexture(abstractclientplayer.getLocationCape());
            }
            else
            {
                ResourceLocation resourcelocation1 = TEXTURE_ELYTRA;

                if (Config.isCustomItems())
                {
                    resourcelocation1 = CustomItems.getCustomElytraTexture(itemstack, resourcelocation1);
                }

                this.renderPlayer.bindTexture(resourcelocation1);
            }
        }
        else
        {
            ResourceLocation resourcelocation = TEXTURE_ELYTRA;

            if (Config.isCustomItems())
            {
                resourcelocation = CustomItems.getCustomElytraTexture(itemstack, resourcelocation);
            }

            this.renderPlayer.bindTexture(resourcelocation);
        }

        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.0F, 0.125F);
        this.modelElytra.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entitylivingbaseIn);
        this.modelElytra.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);

        if (itemstack.isItemEnchanted())
        {
            LayerArmorBase.renderEnchantedGlint(this.renderPlayer, entitylivingbaseIn, this.modelElytra, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
        }

        GlStateManager.disableBlend();
        GlStateManager.popMatrix();
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:61,代码来源:LayerElytra.java


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