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


Java EntityWolf.getShakeAngle方法代码示例

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


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

示例1: setLivingAnimations

import net.minecraft.entity.passive.EntityWolf; //导入方法依赖的package包/类
/**
 * Used for easily adding entity-dependent animations. The second and third float params here are the same second
 * and third as in the setRotationAngles method.
 */
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
{
    EntityWolf entitywolf = (EntityWolf)entitylivingbaseIn;

    if (entitywolf.isAngry())
    {
        this.wolfTail.rotateAngleY = 0.0F;
    }
    else
    {
        this.wolfTail.rotateAngleY = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
    }

    if (entitywolf.isSitting())
    {
        this.wolfMane.setRotationPoint(-1.0F, 16.0F, -3.0F);
        this.wolfMane.rotateAngleX = ((float)Math.PI * 2F / 5F);
        this.wolfMane.rotateAngleY = 0.0F;
        this.wolfBody.setRotationPoint(0.0F, 18.0F, 0.0F);
        this.wolfBody.rotateAngleX = ((float)Math.PI / 4F);
        this.wolfTail.setRotationPoint(-1.0F, 21.0F, 6.0F);
        this.wolfLeg1.setRotationPoint(-2.5F, 22.0F, 2.0F);
        this.wolfLeg1.rotateAngleX = ((float)Math.PI * 3F / 2F);
        this.wolfLeg2.setRotationPoint(0.5F, 22.0F, 2.0F);
        this.wolfLeg2.rotateAngleX = ((float)Math.PI * 3F / 2F);
        this.wolfLeg3.rotateAngleX = 5.811947F;
        this.wolfLeg3.setRotationPoint(-2.49F, 17.0F, -4.0F);
        this.wolfLeg4.rotateAngleX = 5.811947F;
        this.wolfLeg4.setRotationPoint(0.51F, 17.0F, -4.0F);
    }
    else
    {
        this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
        this.wolfBody.rotateAngleX = ((float)Math.PI / 2F);
        this.wolfMane.setRotationPoint(-1.0F, 14.0F, -3.0F);
        this.wolfMane.rotateAngleX = this.wolfBody.rotateAngleX;
        this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
        this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
        this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
        this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
        this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
        this.wolfLeg1.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
        this.wolfLeg2.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F + (float)Math.PI) * 1.4F * p_78086_3_;
        this.wolfLeg3.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F + (float)Math.PI) * 1.4F * p_78086_3_;
        this.wolfLeg4.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
    }

    this.wolfHeadMain.rotateAngleZ = entitywolf.getInterestedAngle(partialTickTime) + entitywolf.getShakeAngle(partialTickTime, 0.0F);
    this.wolfMane.rotateAngleZ = entitywolf.getShakeAngle(partialTickTime, -0.08F);
    this.wolfBody.rotateAngleZ = entitywolf.getShakeAngle(partialTickTime, -0.16F);
    this.wolfTail.rotateAngleZ = entitywolf.getShakeAngle(partialTickTime, -0.2F);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:57,代码来源:ModelWolf.java

示例2: setLivingAnimations

import net.minecraft.entity.passive.EntityWolf; //导入方法依赖的package包/类
/**
 * Used for easily adding entity-dependent animations. The second and third float params here are the same second
 * and third as in the setRotationAngles method.
 */
public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_)
{
    EntityWolf entitywolf = (EntityWolf)p_78086_1_;

    if (entitywolf.isAngry())
    {
        this.wolfTail.rotateAngleY = 0.0F;
    }
    else
    {
        this.wolfTail.rotateAngleY = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
    }

    if (entitywolf.isSitting())
    {
        this.wolfMane.setRotationPoint(-1.0F, 16.0F, -3.0F);
        this.wolfMane.rotateAngleX = ((float)Math.PI * 2F / 5F);
        this.wolfMane.rotateAngleY = 0.0F;
        this.wolfBody.setRotationPoint(0.0F, 18.0F, 0.0F);
        this.wolfBody.rotateAngleX = ((float)Math.PI / 4F);
        this.wolfTail.setRotationPoint(-1.0F, 21.0F, 6.0F);
        this.wolfLeg1.setRotationPoint(-2.5F, 22.0F, 2.0F);
        this.wolfLeg1.rotateAngleX = ((float)Math.PI * 3F / 2F);
        this.wolfLeg2.setRotationPoint(0.5F, 22.0F, 2.0F);
        this.wolfLeg2.rotateAngleX = ((float)Math.PI * 3F / 2F);
        this.wolfLeg3.rotateAngleX = 5.811947F;
        this.wolfLeg3.setRotationPoint(-2.49F, 17.0F, -4.0F);
        this.wolfLeg4.rotateAngleX = 5.811947F;
        this.wolfLeg4.setRotationPoint(0.51F, 17.0F, -4.0F);
    }
    else
    {
        this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
        this.wolfBody.rotateAngleX = ((float)Math.PI / 2F);
        this.wolfMane.setRotationPoint(-1.0F, 14.0F, -3.0F);
        this.wolfMane.rotateAngleX = this.wolfBody.rotateAngleX;
        this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
        this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
        this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
        this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
        this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
        this.wolfLeg1.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
        this.wolfLeg2.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F + (float)Math.PI) * 1.4F * p_78086_3_;
        this.wolfLeg3.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F + (float)Math.PI) * 1.4F * p_78086_3_;
        this.wolfLeg4.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
    }

    this.wolfHeadMain.rotateAngleZ = entitywolf.getInterestedAngle(p_78086_4_) + entitywolf.getShakeAngle(p_78086_4_, 0.0F);
    this.wolfMane.rotateAngleZ = entitywolf.getShakeAngle(p_78086_4_, -0.08F);
    this.wolfBody.rotateAngleZ = entitywolf.getShakeAngle(p_78086_4_, -0.16F);
    this.wolfTail.rotateAngleZ = entitywolf.getShakeAngle(p_78086_4_, -0.2F);
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:57,代码来源:ModelSparkyStatue.java

示例3: setLivingAnimations

import net.minecraft.entity.passive.EntityWolf; //导入方法依赖的package包/类
/**
 * Used for easily adding entity-dependent animations. The second and third float params here are the same second
 * and third as in the setRotationAngles method.
 */
public void setLivingAnimations(EntityLivingBase par1EntityLivingBase, float par2, float par3, float par4)
{
    EntityWolf var5 = (EntityWolf)par1EntityLivingBase;

    if (var5.isAngry())
    {
        this.wolfTail.rotateAngleY = 0.0F;
    }
    else
    {
        this.wolfTail.rotateAngleY = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
    }

    if (var5.isSitting())
    {
        this.wolfMane.setRotationPoint(-1.0F, 16.0F, -3.0F);
        this.wolfMane.rotateAngleX = ((float)Math.PI * 2F / 5F);
        this.wolfMane.rotateAngleY = 0.0F;
        this.wolfBody.setRotationPoint(0.0F, 18.0F, 0.0F);
        this.wolfBody.rotateAngleX = ((float)Math.PI / 4F);
        this.wolfTail.setRotationPoint(-1.0F, 21.0F, 6.0F);
        this.wolfLeg1.setRotationPoint(-2.5F, 22.0F, 2.0F);
        this.wolfLeg1.rotateAngleX = ((float)Math.PI * 3F / 2F);
        this.wolfLeg2.setRotationPoint(0.5F, 22.0F, 2.0F);
        this.wolfLeg2.rotateAngleX = ((float)Math.PI * 3F / 2F);
        this.wolfLeg3.rotateAngleX = 5.811947F;
        this.wolfLeg3.setRotationPoint(-2.49F, 17.0F, -4.0F);
        this.wolfLeg4.rotateAngleX = 5.811947F;
        this.wolfLeg4.setRotationPoint(0.51F, 17.0F, -4.0F);
    }
    else
    {
        this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
        this.wolfBody.rotateAngleX = ((float)Math.PI / 2F);
        this.wolfMane.setRotationPoint(-1.0F, 14.0F, -3.0F);
        this.wolfMane.rotateAngleX = this.wolfBody.rotateAngleX;
        this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
        this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
        this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
        this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
        this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
        this.wolfLeg1.rotateAngleX = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
        this.wolfLeg2.rotateAngleX = MathHelper.cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3;
        this.wolfLeg3.rotateAngleX = MathHelper.cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3;
        this.wolfLeg4.rotateAngleX = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
    }

    this.wolfHeadMain.rotateAngleZ = var5.getInterestedAngle(par4) + var5.getShakeAngle(par4, 0.0F);
    this.wolfMane.rotateAngleZ = var5.getShakeAngle(par4, -0.08F);
    this.wolfBody.rotateAngleZ = var5.getShakeAngle(par4, -0.16F);
    this.wolfTail.rotateAngleZ = var5.getShakeAngle(par4, -0.2F);
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:57,代码来源:ModelWolf.java

示例4: setLivingAnimations

import net.minecraft.entity.passive.EntityWolf; //导入方法依赖的package包/类
public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_)
{
    EntityWolf entitywolf = (EntityWolf)p_78086_1_;

    if (entitywolf.isAngry())
    {
        this.wolfTail.rotateAngleY = 0.0F;
    }
    else
    {
        this.wolfTail.rotateAngleY = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
    }

    if (entitywolf.isSitting())
    {
        this.wolfMane.setRotationPoint(-1.0F, 16.0F, -3.0F);
        this.wolfMane.rotateAngleX = ((float)Math.PI * 2F / 5F);
        this.wolfMane.rotateAngleY = 0.0F;
        this.wolfBody.setRotationPoint(0.0F, 18.0F, 0.0F);
        this.wolfBody.rotateAngleX = ((float)Math.PI / 4F);
        this.wolfTail.setRotationPoint(-1.0F, 21.0F, 6.0F);
        this.wolfLeg1.setRotationPoint(-2.5F, 22.0F, 2.0F);
        this.wolfLeg1.rotateAngleX = ((float)Math.PI * 3F / 2F);
        this.wolfLeg2.setRotationPoint(0.5F, 22.0F, 2.0F);
        this.wolfLeg2.rotateAngleX = ((float)Math.PI * 3F / 2F);
        this.wolfLeg3.rotateAngleX = 5.811947F;
        this.wolfLeg3.setRotationPoint(-2.49F, 17.0F, -4.0F);
        this.wolfLeg4.rotateAngleX = 5.811947F;
        this.wolfLeg4.setRotationPoint(0.51F, 17.0F, -4.0F);
    }
    else
    {
        this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
        this.wolfBody.rotateAngleX = ((float)Math.PI / 2F);
        this.wolfMane.setRotationPoint(-1.0F, 14.0F, -3.0F);
        this.wolfMane.rotateAngleX = this.wolfBody.rotateAngleX;
        this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
        this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
        this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
        this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
        this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
        this.wolfLeg1.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
        this.wolfLeg2.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F + (float)Math.PI) * 1.4F * p_78086_3_;
        this.wolfLeg3.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F + (float)Math.PI) * 1.4F * p_78086_3_;
        this.wolfLeg4.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
    }

    this.wolfHeadMain.rotateAngleZ = entitywolf.getInterestedAngle(p_78086_4_) + entitywolf.getShakeAngle(p_78086_4_, 0.0F);
    this.wolfMane.rotateAngleZ = entitywolf.getShakeAngle(p_78086_4_, -0.08F);
    this.wolfBody.rotateAngleZ = entitywolf.getShakeAngle(p_78086_4_, -0.16F);
    this.wolfTail.rotateAngleZ = entitywolf.getShakeAngle(p_78086_4_, -0.2F);
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:53,代码来源:ModelWolf.java

示例5: setLivingAnimations

import net.minecraft.entity.passive.EntityWolf; //导入方法依赖的package包/类
/**
 * Used for easily adding entity-dependent animations. The second and third float params here are the same second
 * and third as in the setRotationAngles method.
 */
public void setLivingAnimations(EntityLivingBase par1EntityLivingBase, float par2, float par3, float par4)
{
    EntityWolf entitywolf = (EntityWolf)par1EntityLivingBase;

    if (entitywolf.isAngry())
    {
        this.wolfTail.rotateAngleY = 0.0F;
    }
    else
    {
        this.wolfTail.rotateAngleY = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
    }

    if (entitywolf.isSitting())
    {
        this.wolfMane.setRotationPoint(-1.0F, 16.0F, -3.0F);
        this.wolfMane.rotateAngleX = ((float)Math.PI * 2F / 5F);
        this.wolfMane.rotateAngleY = 0.0F;
        this.wolfBody.setRotationPoint(0.0F, 18.0F, 0.0F);
        this.wolfBody.rotateAngleX = ((float)Math.PI / 4F);
        this.wolfTail.setRotationPoint(-1.0F, 21.0F, 6.0F);
        this.wolfLeg1.setRotationPoint(-2.5F, 22.0F, 2.0F);
        this.wolfLeg1.rotateAngleX = ((float)Math.PI * 3F / 2F);
        this.wolfLeg2.setRotationPoint(0.5F, 22.0F, 2.0F);
        this.wolfLeg2.rotateAngleX = ((float)Math.PI * 3F / 2F);
        this.wolfLeg3.rotateAngleX = 5.811947F;
        this.wolfLeg3.setRotationPoint(-2.49F, 17.0F, -4.0F);
        this.wolfLeg4.rotateAngleX = 5.811947F;
        this.wolfLeg4.setRotationPoint(0.51F, 17.0F, -4.0F);
    }
    else
    {
        this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
        this.wolfBody.rotateAngleX = ((float)Math.PI / 2F);
        this.wolfMane.setRotationPoint(-1.0F, 14.0F, -3.0F);
        this.wolfMane.rotateAngleX = this.wolfBody.rotateAngleX;
        this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
        this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
        this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
        this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
        this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
        this.wolfLeg1.rotateAngleX = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
        this.wolfLeg2.rotateAngleX = MathHelper.cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3;
        this.wolfLeg3.rotateAngleX = MathHelper.cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3;
        this.wolfLeg4.rotateAngleX = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
    }

    this.wolfHeadMain.rotateAngleZ = entitywolf.getInterestedAngle(par4) + entitywolf.getShakeAngle(par4, 0.0F);
    this.wolfMane.rotateAngleZ = entitywolf.getShakeAngle(par4, -0.08F);
    this.wolfBody.rotateAngleZ = entitywolf.getShakeAngle(par4, -0.16F);
    this.wolfTail.rotateAngleZ = entitywolf.getShakeAngle(par4, -0.2F);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:57,代码来源:ModelWolf.java


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