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