本文整理匯總了Java中net.minecraft.client.entity.AbstractClientPlayer.getLocationElytra方法的典型用法代碼示例。如果您正苦於以下問題:Java AbstractClientPlayer.getLocationElytra方法的具體用法?Java AbstractClientPlayer.getLocationElytra怎麽用?Java AbstractClientPlayer.getLocationElytra使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.client.entity.AbstractClientPlayer
的用法示例。
在下文中一共展示了AbstractClientPlayer.getLocationElytra方法的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();
}
}
示例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();
}
}