當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。