本文整理汇总了Java中net.minecraft.entity.player.EntityPlayer.isWearing方法的典型用法代码示例。如果您正苦于以下问题:Java EntityPlayer.isWearing方法的具体用法?Java EntityPlayer.isWearing怎么用?Java EntityPlayer.isWearing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.player.EntityPlayer
的用法示例。
在下文中一共展示了EntityPlayer.isWearing方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doRenderLayer
import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
@Override
//func_177093_a(entity, f8, f7, partialTicks, f5, f4, f9, 0.0625F);
public void doRenderLayer(EntityPlayer player, float f, float f1, float renderTick, float f2, float f3, float f4, float f5)
{
if(iChunUtil.hasMorphMod() && MorphApi.getApiImpl().hasMorph(player.getName(), Side.CLIENT) && (MorphApi.getApiImpl().morphProgress(player.getName(), Side.CLIENT) < 1.0F || !(MorphApi.getApiImpl().getMorphEntity(player.getEntityWorld(), player.getName(), Side.CLIENT) instanceof EntityPlayer)))
{
return;
}
if(!(player.isWearing(EnumPlayerModelParts.CAPE) && ((AbstractClientPlayer)player).getLocationCape() != null) && !player.isInvisible() && !player.isPlayerSleeping())
{
ItemStack is = BackTools.eventHandlerClient.playerTool.get(player.getName());
ItemStack heldItem = player.getHeldItem(EnumHand.MAIN_HAND);
if(!heldItem.isEmpty())
{
ItemStack is1 = heldItem.copy();
is1.setItemDamage(0);
heldItem = is1;
}
if(is != null && !is.isEmpty() && !ItemStack.areItemStacksEqual(is, heldItem))
{
GlStateManager.pushMatrix();
GlStateManager.translate(0.0f, 0.35F, 0.16F);
if(!player.inventory.armorItemInSlot(2).isEmpty())
{
GlStateManager.translate(0.0F, player.isSneaking() ? -0.1F : 0.0F, player.isSneaking() ? 0.025F : 0.06F);
}
if(player.isSneaking())
{
GlStateManager.translate(0F, 0.08F, 0.13F);
GlStateManager.rotate(28.8F, 1.0F, 0.0F, 0.0F);
}
GlStateManager.rotate((float)(BackTools.getOrientation(is.getItem().getClass()) - 1) * -90F, 0.0F, 0.0F, 1.0F);
GlStateManager.rotate(180F, 0.0F, 1.0F, 0.0F);
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
IBakedModel model = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel(is);
RendererHelper.renderBakedModel(model, -1, is);
GlStateManager.disableBlend();
GlStateManager.enableLighting();
GlStateManager.enableAlpha();
GlStateManager.popMatrix();
}
}
}