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


Java ModelBiped.ArmPose方法代码示例

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


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

示例1: setModelVisibilities

import net.minecraft.client.model.ModelBiped; //导入方法依赖的package包/类
public void setModelVisibilities (T entity) {

        final ModelPlayerMob model = this.getMainModel();
        final ItemStack mainhand = entity.getHeldItemMainhand();
        final ItemStack offhand = entity.getHeldItemOffhand();

        model.setVisible(true);
        this.setOverlayVisibility(entity, model);
        model.isSneak = entity.isSneaking();

        final ModelBiped.ArmPose mainArm = this.getPoseForStack(entity, mainhand);
        final ModelBiped.ArmPose offhandArm = this.getPoseForStack(entity, offhand);

        final boolean isRightHanded = entity.getPrimaryHand() == EnumHandSide.RIGHT;

        model.rightArmPose = isRightHanded ? mainArm : offhandArm;
        model.leftArmPose = isRightHanded ? offhandArm : mainArm;
    }
 
开发者ID:Darkhax-Minecraft,项目名称:Bookshelf,代码行数:19,代码来源:RenderPlayerMob.java

示例2: setModelVisibilities

import net.minecraft.client.model.ModelBiped; //导入方法依赖的package包/类
private void setModelVisibilities(AbstractClientPlayer clientPlayer)
{
    ModelPlayer modelplayer = this.getMainModel();

    if (clientPlayer.isSpectator())
    {
        modelplayer.setInvisible(false);
        modelplayer.bipedHead.showModel = true;
        modelplayer.bipedHeadwear.showModel = true;
    }
    else
    {
        ItemStack itemstack = clientPlayer.getHeldItemMainhand();
        ItemStack itemstack1 = clientPlayer.getHeldItemOffhand();
        modelplayer.setInvisible(true);
        modelplayer.bipedHeadwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.HAT);
        modelplayer.bipedBodyWear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.JACKET);
        modelplayer.bipedLeftLegwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.LEFT_PANTS_LEG);
        modelplayer.bipedRightLegwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.RIGHT_PANTS_LEG);
        modelplayer.bipedLeftArmwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.LEFT_SLEEVE);
        modelplayer.bipedRightArmwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.RIGHT_SLEEVE);
        modelplayer.isSneak = clientPlayer.isSneaking();
        ModelBiped.ArmPose modelbiped$armpose = ModelBiped.ArmPose.EMPTY;
        ModelBiped.ArmPose modelbiped$armpose1 = ModelBiped.ArmPose.EMPTY;

        if (!itemstack.func_190926_b())
        {
            modelbiped$armpose = ModelBiped.ArmPose.ITEM;

            if (clientPlayer.getItemInUseCount() > 0)
            {
                EnumAction enumaction = itemstack.getItemUseAction();

                if (enumaction == EnumAction.BLOCK)
                {
                    modelbiped$armpose = ModelBiped.ArmPose.BLOCK;
                }
                else if (enumaction == EnumAction.BOW)
                {
                    modelbiped$armpose = ModelBiped.ArmPose.BOW_AND_ARROW;
                }
            }
        }

        if (!itemstack1.func_190926_b())
        {
            modelbiped$armpose1 = ModelBiped.ArmPose.ITEM;

            if (clientPlayer.getItemInUseCount() > 0)
            {
                EnumAction enumaction1 = itemstack1.getItemUseAction();

                if (enumaction1 == EnumAction.BLOCK)
                {
                    modelbiped$armpose1 = ModelBiped.ArmPose.BLOCK;
                }
            }
        }

        if (clientPlayer.getPrimaryHand() == EnumHandSide.RIGHT)
        {
            modelplayer.rightArmPose = modelbiped$armpose;
            modelplayer.leftArmPose = modelbiped$armpose1;
        }
        else
        {
            modelplayer.rightArmPose = modelbiped$armpose1;
            modelplayer.leftArmPose = modelbiped$armpose;
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:72,代码来源:RenderPlayer.java

示例3: setModelVisibilities

import net.minecraft.client.model.ModelBiped; //导入方法依赖的package包/类
private void setModelVisibilities(AbstractClientPlayer clientPlayer)
{
    ModelPlayer modelplayer = this.getMainModel();

    if (clientPlayer.isSpectator())
    {
        modelplayer.setInvisible(false);
        modelplayer.bipedHead.showModel = true;
        modelplayer.bipedHeadwear.showModel = true;
    }
    else
    {
        ItemStack itemstack = clientPlayer.getHeldItemMainhand();
        ItemStack itemstack1 = clientPlayer.getHeldItemOffhand();
        modelplayer.setInvisible(true);
        modelplayer.bipedHeadwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.HAT);
        modelplayer.bipedBodyWear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.JACKET);
        modelplayer.bipedLeftLegwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.LEFT_PANTS_LEG);
        modelplayer.bipedRightLegwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.RIGHT_PANTS_LEG);
        modelplayer.bipedLeftArmwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.LEFT_SLEEVE);
        modelplayer.bipedRightArmwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.RIGHT_SLEEVE);
        modelplayer.isSneak = clientPlayer.isSneaking();
        ModelBiped.ArmPose modelbiped$armpose = ModelBiped.ArmPose.EMPTY;
        ModelBiped.ArmPose modelbiped$armpose1 = ModelBiped.ArmPose.EMPTY;

        if (itemstack != null)
        {
            modelbiped$armpose = ModelBiped.ArmPose.ITEM;

            if (clientPlayer.getItemInUseCount() > 0)
            {
                EnumAction enumaction = itemstack.getItemUseAction();

                if (enumaction == EnumAction.BLOCK)
                {
                    modelbiped$armpose = ModelBiped.ArmPose.BLOCK;
                }
                else if (enumaction == EnumAction.BOW)
                {
                    modelbiped$armpose = ModelBiped.ArmPose.BOW_AND_ARROW;
                }
            }
        }

        if (itemstack1 != null)
        {
            modelbiped$armpose1 = ModelBiped.ArmPose.ITEM;

            if (clientPlayer.getItemInUseCount() > 0)
            {
                EnumAction enumaction1 = itemstack1.getItemUseAction();

                if (enumaction1 == EnumAction.BLOCK)
                {
                    modelbiped$armpose1 = ModelBiped.ArmPose.BLOCK;
                }
                // FORGE: fix MC-88356 allow offhand to use bow and arrow animation
                else if (enumaction1 == EnumAction.BOW)
                {
                    modelbiped$armpose1 = ModelBiped.ArmPose.BOW_AND_ARROW;
                }
            }
        }

        if (clientPlayer.getPrimaryHand() == EnumHandSide.RIGHT)
        {
            modelplayer.rightArmPose = modelbiped$armpose;
            modelplayer.leftArmPose = modelbiped$armpose1;
        }
        else
        {
            modelplayer.rightArmPose = modelbiped$armpose1;
            modelplayer.leftArmPose = modelbiped$armpose;
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:77,代码来源:RenderPlayer.java

示例4: setModelVisibilities

import net.minecraft.client.model.ModelBiped; //导入方法依赖的package包/类
private void setModelVisibilities(EntityMinionBase clientPlayer)
{
	ModelMinionBase modelplayer = this.getMainModel();
	ItemStack itemstack = clientPlayer.getHeldItemMainhand();
    ItemStack itemstack1 = clientPlayer.getHeldItemOffhand();
    modelplayer.setInvisible(true);
    modelplayer.bipedHeadwear.showModel = true;//clientPlayer.isWearing(EnumPlayerModelParts.HAT);
    modelplayer.bipedBodyWear.showModel = true;//clientPlayer.isWearing(EnumPlayerModelParts.JACKET);
    modelplayer.bipedLeftLegwear.showModel = true;//clientPlayer.isWearing(EnumPlayerModelParts.LEFT_PANTS_LEG);
    modelplayer.bipedRightLegwear.showModel = true;//clientPlayer.isWearing(EnumPlayerModelParts.RIGHT_PANTS_LEG);
    modelplayer.bipedLeftArmwear.showModel = true;//clientPlayer.isWearing(EnumPlayerModelParts.LEFT_SLEEVE);
    modelplayer.bipedRightArmwear.showModel = true;//clientPlayer.isWearing(EnumPlayerModelParts.RIGHT_SLEEVE);
    modelplayer.leftArmPose = ModelBiped.ArmPose.EMPTY;
    modelplayer.isSneak = clientPlayer.isSneaking();

    ModelBiped.ArmPose modelbiped$armpose = ModelBiped.ArmPose.EMPTY;
    ModelBiped.ArmPose modelbiped$armpose1 = ModelBiped.ArmPose.EMPTY;

    if (itemstack != null)
    {
        modelbiped$armpose = ModelBiped.ArmPose.ITEM;

        if (clientPlayer.getItemInUseCount() > 0)
        {
            EnumAction enumaction = itemstack.getItemUseAction();

            if (enumaction == EnumAction.BLOCK)
            {
                modelbiped$armpose = ModelBiped.ArmPose.BLOCK;
            }
            else if (enumaction == EnumAction.BOW)
            {
                modelbiped$armpose = ModelBiped.ArmPose.BOW_AND_ARROW;
            }
        }
    }

    if (itemstack1 != null)
    {
        modelbiped$armpose1 = ModelBiped.ArmPose.ITEM;

        if (clientPlayer.getItemInUseCount() > 0)
        {
            EnumAction enumaction1 = itemstack1.getItemUseAction();

            if (enumaction1 == EnumAction.BLOCK)
            {
                modelbiped$armpose1 = ModelBiped.ArmPose.BLOCK;
            }
        }
    }

    if (clientPlayer.getPrimaryHand() == EnumHandSide.RIGHT)
    {
        modelplayer.rightArmPose = modelbiped$armpose;
        modelplayer.leftArmPose = modelbiped$armpose1;
    }
    else
    {
        modelplayer.rightArmPose = modelbiped$armpose1;
        modelplayer.leftArmPose = modelbiped$armpose;
    }
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:64,代码来源:RenderMinionBase.java

示例5: setModelVisibilities

import net.minecraft.client.model.ModelBiped; //导入方法依赖的package包/类
public void setModelVisibilities(AbstractClientPlayer clientPlayer)
{
	ModelPlayer modelplayer = this.getMainModel();
	
	if (clientPlayer.isSpectator())
	{
		modelplayer.setInvisible(false);
		modelplayer.bipedHead.showModel = true;
		modelplayer.bipedHeadwear.showModel = true;
	}
	else
	{
		ItemStack itemstack = clientPlayer.getHeldItemMainhand();
		ItemStack itemstack1 = clientPlayer.getHeldItemOffhand();
		modelplayer.setInvisible(true);
		modelplayer.bipedHeadwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.HAT);
		modelplayer.bipedBodyWear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.JACKET);
		modelplayer.bipedLeftLegwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.LEFT_PANTS_LEG);
		modelplayer.bipedRightLegwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.RIGHT_PANTS_LEG);
		modelplayer.bipedLeftArmwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.LEFT_SLEEVE);
		modelplayer.bipedRightArmwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.RIGHT_SLEEVE);
		modelplayer.isSneak = clientPlayer.isSneaking();
		ModelBiped.ArmPose modelbiped$armpose = ModelBiped.ArmPose.EMPTY;
		ModelBiped.ArmPose modelbiped$armpose1 = ModelBiped.ArmPose.EMPTY;

		if (itemstack != null)
		{
			modelbiped$armpose = ModelBiped.ArmPose.ITEM;

			if (clientPlayer.getItemInUseCount() > 0)
			{
				EnumAction enumaction = itemstack.getItemUseAction();

				if (enumaction == EnumAction.BLOCK)
				{
					modelbiped$armpose = ModelBiped.ArmPose.BLOCK;
				}
				else if (enumaction == EnumAction.BOW)
				{
					modelbiped$armpose = ModelBiped.ArmPose.BOW_AND_ARROW;
				}
			}
		}

		if (itemstack1 != null)
		{
			modelbiped$armpose1 = ModelBiped.ArmPose.ITEM;

			if (clientPlayer.getItemInUseCount() > 0)
			{
				EnumAction enumaction1 = itemstack1.getItemUseAction();

				if (enumaction1 == EnumAction.BLOCK)
				{
					modelbiped$armpose1 = ModelBiped.ArmPose.BLOCK;
				}
				// FORGE: fix MC-88356 allow offhand to use bow and arrow animation
				else if (enumaction1 == EnumAction.BOW)
				{
					modelbiped$armpose1 = ModelBiped.ArmPose.BOW_AND_ARROW;
				}
			}
		}

		if (clientPlayer.getPrimaryHand() == EnumHandSide.RIGHT)
		{
			modelplayer.rightArmPose = modelbiped$armpose;
			modelplayer.leftArmPose = modelbiped$armpose1;
		}
		else
		{
			modelplayer.rightArmPose = modelbiped$armpose1;
			modelplayer.leftArmPose = modelbiped$armpose;
		}
	}
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:77,代码来源:RenderMiniPlayer.java

示例6: setHands

import net.minecraft.client.model.ModelBiped; //导入方法依赖的package包/类
/**
 * Set hands postures
 */
private void setHands(EntityLivingBase entity)
{
    ItemStack rightItem = entity.getHeldItemMainhand();
    ItemStack leftItem = entity.getHeldItemOffhand();

    ModelBiped.ArmPose right = ModelBiped.ArmPose.EMPTY;
    ModelBiped.ArmPose left = ModelBiped.ArmPose.EMPTY;
    ModelCustom model = (ModelCustom) this.mainModel;

    if (rightItem != null)
    {
        right = ModelBiped.ArmPose.ITEM;

        if (entity.getItemInUseCount() > 0)
        {
            EnumAction enumaction = rightItem.getItemUseAction();

            if (enumaction == EnumAction.BLOCK)
            {
                right = ModelBiped.ArmPose.BLOCK;
            }
            else if (enumaction == EnumAction.BOW)
            {
                right = ModelBiped.ArmPose.BOW_AND_ARROW;
            }
        }
    }

    if (leftItem != null)
    {
        left = ModelBiped.ArmPose.ITEM;

        if (entity.getItemInUseCount() > 0)
        {
            EnumAction enumaction1 = leftItem.getItemUseAction();

            if (enumaction1 == EnumAction.BLOCK)
            {
                left = ModelBiped.ArmPose.BLOCK;
            }
        }
    }

    model.rightArmPose = right;
    model.leftArmPose = left;
}
 
开发者ID:mchorse,项目名称:metamorph,代码行数:50,代码来源:RenderCustomModel.java

示例7: setModelVisibilities

import net.minecraft.client.model.ModelBiped; //导入方法依赖的package包/类
private void setModelVisibilities(EntityGuard clientPlayer) {
	ModelGuard modelplayer = (ModelGuard) this.getMainModel();

	ItemStack itemstack = clientPlayer.getHeldItemMainhand();
	ItemStack itemstack1 = clientPlayer.getHeldItemOffhand();
	modelplayer.setVisible(true);

	modelplayer.isSneak = clientPlayer.isSneaking();
	ModelBiped.ArmPose modelbiped$armpose = ModelBiped.ArmPose.EMPTY;
	ModelBiped.ArmPose modelbiped$armpose1 = ModelBiped.ArmPose.EMPTY;

	if (itemstack != null) {
		modelbiped$armpose = ModelBiped.ArmPose.ITEM;

		if (clientPlayer.getItemInUseCount() > 0) {
			EnumAction enumaction = itemstack.getItemUseAction();

			if (enumaction == EnumAction.BLOCK) {
				modelbiped$armpose = ModelBiped.ArmPose.BLOCK;
			} else if (enumaction == EnumAction.BOW) {
				modelbiped$armpose = ModelBiped.ArmPose.BOW_AND_ARROW;
			}
		}
	}

	if (itemstack1 != null) {
		modelbiped$armpose1 = ModelBiped.ArmPose.ITEM;

		if (clientPlayer.getItemInUseCount() > 0) {
			EnumAction enumaction1 = itemstack1.getItemUseAction();

			if (enumaction1 == EnumAction.BLOCK) {
				modelbiped$armpose1 = ModelBiped.ArmPose.BLOCK;
			}
		}
	}

	if (clientPlayer.getPrimaryHand() == EnumHandSide.RIGHT) {
		modelplayer.rightArmPose = modelbiped$armpose;
		modelplayer.leftArmPose = modelbiped$armpose1;
	} else {
		modelplayer.rightArmPose = modelbiped$armpose1;
		modelplayer.leftArmPose = modelbiped$armpose;
	}

}
 
开发者ID:ToroCraft,项目名称:ToroQuest,代码行数:47,代码来源:RenderGuard.java

示例8: getPoseForStack

import net.minecraft.client.model.ModelBiped; //导入方法依赖的package包/类
public ArmPose getPoseForStack (T entity, ItemStack stack) {

        ModelBiped.ArmPose pose = ModelBiped.ArmPose.EMPTY;

        if (!stack.isEmpty()) {

            pose = ModelBiped.ArmPose.ITEM;

            if (entity.getItemInUseCount() > 0) {

                final EnumAction actionType = stack.getItemUseAction();

                pose = actionType == EnumAction.BLOCK ? ArmPose.BLOCK : actionType == EnumAction.BOW ? ArmPose.BOW_AND_ARROW : ArmPose.EMPTY;
            }
        }

        return pose;
    }
 
开发者ID:Darkhax-Minecraft,项目名称:Bookshelf,代码行数:19,代码来源:RenderPlayerMob.java

示例9: setModelVisibilities

import net.minecraft.client.model.ModelBiped; //导入方法依赖的package包/类
private void setModelVisibilities(AbstractClientPlayer clientPlayer)
{
    ModelPlayer modelplayer = this.getMainModel();

    if (clientPlayer.isSpectator())
    {
        modelplayer.setInvisible(false);
        modelplayer.bipedHead.showModel = true;
        modelplayer.bipedHeadwear.showModel = true;
    }
    else
    {
        ItemStack itemstack = clientPlayer.getHeldItemMainhand();
        ItemStack itemstack1 = clientPlayer.getHeldItemOffhand();
        modelplayer.setInvisible(true);
        modelplayer.bipedHeadwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.HAT);
        modelplayer.bipedBodyWear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.JACKET);
        modelplayer.bipedLeftLegwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.LEFT_PANTS_LEG);
        modelplayer.bipedRightLegwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.RIGHT_PANTS_LEG);
        modelplayer.bipedLeftArmwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.LEFT_SLEEVE);
        modelplayer.bipedRightArmwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.RIGHT_SLEEVE);
        modelplayer.isSneak = clientPlayer.isSneaking();
        ModelBiped.ArmPose modelbiped$armpose = ModelBiped.ArmPose.EMPTY;
        ModelBiped.ArmPose modelbiped$armpose1 = ModelBiped.ArmPose.EMPTY;

        if (itemstack != null)
        {
            modelbiped$armpose = ModelBiped.ArmPose.ITEM;

            if (clientPlayer.getItemInUseCount() > 0)
            {
                EnumAction enumaction = itemstack.getItemUseAction();

                if (enumaction == EnumAction.BLOCK)
                {
                    modelbiped$armpose = ModelBiped.ArmPose.BLOCK;
                }
                else if (enumaction == EnumAction.BOW)
                {
                    modelbiped$armpose = ModelBiped.ArmPose.BOW_AND_ARROW;
                }
            }
        }

        if (itemstack1 != null)
        {
            modelbiped$armpose1 = ModelBiped.ArmPose.ITEM;

            if (clientPlayer.getItemInUseCount() > 0)
            {
                EnumAction enumaction1 = itemstack1.getItemUseAction();

                if (enumaction1 == EnumAction.BLOCK)
                {
                    modelbiped$armpose1 = ModelBiped.ArmPose.BLOCK;
                }
            }
        }

        if (clientPlayer.getPrimaryHand() == EnumHandSide.RIGHT)
        {
            modelplayer.rightArmPose = modelbiped$armpose;
            modelplayer.leftArmPose = modelbiped$armpose1;
        }
        else
        {
            modelplayer.rightArmPose = modelbiped$armpose1;
            modelplayer.leftArmPose = modelbiped$armpose;
        }
    }
}
 
开发者ID:BlazeAxtrius,项目名称:ExpandedRailsMod,代码行数:72,代码来源:RenderPlayer.java


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