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


Java EntityShulker.getClientPeekAmount方法代码示例

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


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

示例1: setRotationAngles

import net.minecraft.entity.monster.EntityShulker; //导入方法依赖的package包/类
/**
 * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
 * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
 * "far" arms and legs can swing at most.
 */
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
{
    EntityShulker entityshulker = (EntityShulker)entityIn;
    float f = ageInTicks - (float)entityshulker.ticksExisted;
    float f1 = (0.5F + entityshulker.getClientPeekAmount(f)) * (float)Math.PI;
    float f2 = -1.0F + MathHelper.sin(f1);
    float f3 = 0.0F;

    if (f1 > (float)Math.PI)
    {
        f3 = MathHelper.sin(ageInTicks * 0.1F) * 0.7F;
    }

    this.lid.setRotationPoint(0.0F, 16.0F + MathHelper.sin(f1) * 8.0F + f3, 0.0F);

    if (entityshulker.getClientPeekAmount(f) > 0.3F)
    {
        this.lid.rotateAngleY = f2 * f2 * f2 * f2 * (float)Math.PI * 0.125F;
    }
    else
    {
        this.lid.rotateAngleY = 0.0F;
    }

    this.head.rotateAngleX = headPitch * 0.017453292F;
    this.head.rotateAngleY = netHeadYaw * 0.017453292F;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:33,代码来源:ModelShulker.java

示例2: getHatScale

import net.minecraft.entity.monster.EntityShulker; //导入方法依赖的package包/类
@Override
public float getHatScale(EntityLivingBase ent)
{
    EntityShulker shulker = (EntityShulker)ent;
    float peek = shulker.getClientPeekAmount(1F);
    if(peek <= 0.0F)
    {
        return 0F;
    }
    return 0.75F;
}
 
开发者ID:iChun,项目名称:Hats,代码行数:12,代码来源:HelperShulker.java

示例3: getEyeScale

import net.minecraft.entity.monster.EntityShulker; //导入方法依赖的package包/类
@Override
public float getEyeScale(EntityShulker living, float partialTick, int eye)
{
    if(living.getClientPeekAmount(partialTick) <= 0F)
    {
        return 0F;
    }
    return eyeScale;
}
 
开发者ID:iChun,项目名称:iChunUtil,代码行数:10,代码来源:HeadShulker.java


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