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


Java EnumAction.BOW属性代码示例

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


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

示例1: getItemUseAction

@Override
public EnumAction getItemUseAction(ItemStack stack) {
	switch (getSpell(stack).getCastingType()) {
	case INSTANT:
		return EnumAction.NONE;
	case MELEE:
		return EnumAction.NONE;
	case CONTINUOUS:
		return EnumAction.BOW;
	case CHARGED:
		return EnumAction.BOW;
	}
	return EnumAction.NONE;
}
 
开发者ID:the-realest-stu,项目名称:Infernum,代码行数:14,代码来源:ItemSpellPage.java

示例2: getItemUseAction

@Nonnull
@Override
public EnumAction getItemUseAction(ItemStack stack) {
	boolean anyNotContinuous = false;
	for (Module module : SpellUtils.getModules(stack))
		if (!(module instanceof IContinuousModule && module.getChargeupTime() <= 0)) {
			anyNotContinuous = true;
			break;
		}
	return anyNotContinuous ? EnumAction.NONE : EnumAction.BOW;
}
 
开发者ID:TeamWizardry,项目名称:Wizardry,代码行数:11,代码来源:ItemStaff.java

示例3: onItemRightClick

@Nonnull
@Override
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, @Nonnull EnumHand hand) {
	ItemStack stack = player.getHeldItem(hand);
	if (getItemUseAction(stack) == EnumAction.BOW) {
		if (world.isRemote && (Minecraft.getMinecraft().currentScreen != null)) {
			return new ActionResult<>(EnumActionResult.FAIL, stack);
		} else {
			player.setActiveHand(hand);
			return new ActionResult<>(EnumActionResult.PASS, stack);
		}
	} else return new ActionResult<>(EnumActionResult.FAIL, stack);
}
 
开发者ID:TeamWizardry,项目名称:Wizardry,代码行数:13,代码来源:ItemSyringe.java

示例4: getItemUseAction

@Override
public EnumAction getItemUseAction(ItemStack stack) {
	return EnumAction.BOW;
}
 
开发者ID:PorPit,项目名称:MineCamera,代码行数:4,代码来源:ItemCamera.java

示例5: getItemUseAction

@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
    return EnumAction.BOW;
}
 
开发者ID:iChun,项目名称:Torched,代码行数:5,代码来源:ItemTorchGun.java

示例6: getItemUseAction

@Override
public EnumAction getItemUseAction(ItemStack stack)
{
	return EnumAction.BOW;
}
 
开发者ID:TeamMelodium,项目名称:Melodium,代码行数:5,代码来源:ItemTempSpellCaster.java

示例7: setModelVisibilities

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.inventory.getCurrentItem();
        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.heldItemLeft = 0;
        modelplayer.aimedBow = false;
        modelplayer.isSneak = clientPlayer.isSneaking();

        if (itemstack == null)
        {
            modelplayer.heldItemRight = 0;
        }
        else
        {
            modelplayer.heldItemRight = 1;

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

                if (enumaction == EnumAction.BLOCK)
                {
                    modelplayer.heldItemRight = 3;
                }
                else if (enumaction == EnumAction.BOW)
                {
                    modelplayer.aimedBow = true;
                }
            }
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:48,代码来源:RenderPlayer.java

示例8: getItemUseAction

/**
 * returns the action that specifies what animation to play when the items is being used
 */
public EnumAction getItemUseAction(ItemStack itemstack)
{
    return EnumAction.BOW;
}
 
开发者ID:TwilightWingsStudio,项目名称:CompositeGear,代码行数:7,代码来源:ItemCGBow.java

示例9: setModelVisibilities

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,代码行数:71,代码来源:RenderPlayer.java

示例10: getItemUseAction

/**
 * returns the action that specifies what animation to play when the items
 * is being used
 */
@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
	return EnumAction.BOW;
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:8,代码来源:TNTCannon.java

示例11: setModelVisibilities

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,代码行数:76,代码来源:RenderPlayer.java

示例12: getItemUseAction

@Override
public EnumAction getItemUseAction(ItemStack stack) {
    return EnumAction.BOW;
}
 
开发者ID:DaedalusGame,项目名称:BetterWithAddons,代码行数:4,代码来源:ItemTanto.java

示例13: setModelVisibilities

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,代码行数:63,代码来源:RenderMinionBase.java

示例14: getItemUseAction

@Override
public EnumAction getItemUseAction(ItemStack itemstack)
{
	return EnumAction.BOW;
}
 
开发者ID:BubbleTrouble14,项目名称:ARKCraft,代码行数:5,代码来源:ItemSpear.java

示例15: getItemUseAction

@Override public EnumAction getItemUseAction(ItemStack stack) {
	return EnumAction.BOW;
}
 
开发者ID:Szewek,项目名称:Minecraft-Flux,代码行数:3,代码来源:ItemUpChip.java


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