本文整理汇总了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;
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
示例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;
}
}
}
示例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;
}
示例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;
}
}
示例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;
}
示例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;
}
}
}