本文整理汇总了Java中net.minecraft.entity.boss.EntityDragon.getMovementOffsets方法的典型用法代码示例。如果您正苦于以下问题:Java EntityDragon.getMovementOffsets方法的具体用法?Java EntityDragon.getMovementOffsets怎么用?Java EntityDragon.getMovementOffsets使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.boss.EntityDragon
的用法示例。
在下文中一共展示了EntityDragon.getMovementOffsets方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: rotateCorpse
import net.minecraft.entity.boss.EntityDragon; //导入方法依赖的package包/类
protected void rotateCorpse(EntityDragon bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{
float f = (float)bat.getMovementOffsets(7, partialTicks)[0];
float f1 = (float)(bat.getMovementOffsets(5, partialTicks)[1] - bat.getMovementOffsets(10, partialTicks)[1]);
GlStateManager.rotate(-f, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(f1 * 10.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(0.0F, 0.0F, 1.0F);
if (bat.deathTime > 0)
{
float f2 = ((float)bat.deathTime + partialTicks - 1.0F) / 20.0F * 1.6F;
f2 = MathHelper.sqrt_float(f2);
if (f2 > 1.0F)
{
f2 = 1.0F;
}
GlStateManager.rotate(f2 * this.getDeathMaxRotation(bat), 0.0F, 0.0F, 1.0F);
}
}
示例2: rotateCorpse
import net.minecraft.entity.boss.EntityDragon; //导入方法依赖的package包/类
protected void rotateCorpse(EntityDragon entityLiving, float p_77043_2_, float p_77043_3_, float partialTicks)
{
float f = (float)entityLiving.getMovementOffsets(7, partialTicks)[0];
float f1 = (float)(entityLiving.getMovementOffsets(5, partialTicks)[1] - entityLiving.getMovementOffsets(10, partialTicks)[1]);
GlStateManager.rotate(-f, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(f1 * 10.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(0.0F, 0.0F, 1.0F);
if (entityLiving.deathTime > 0)
{
float f2 = ((float)entityLiving.deathTime + partialTicks - 1.0F) / 20.0F * 1.6F;
f2 = MathHelper.sqrt(f2);
if (f2 > 1.0F)
{
f2 = 1.0F;
}
GlStateManager.rotate(f2 * this.getDeathMaxRotation(entityLiving), 0.0F, 0.0F, 1.0F);
}
}
示例3: rotateCorpse
import net.minecraft.entity.boss.EntityDragon; //导入方法依赖的package包/类
protected void rotateCorpse(EntityDragon entityLiving, float p_77043_2_, float p_77043_3_, float partialTicks)
{
float f = (float)entityLiving.getMovementOffsets(7, partialTicks)[0];
float f1 = (float)(entityLiving.getMovementOffsets(5, partialTicks)[1] - entityLiving.getMovementOffsets(10, partialTicks)[1]);
GlStateManager.rotate(-f, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(f1 * 10.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(0.0F, 0.0F, 1.0F);
if (entityLiving.deathTime > 0)
{
float f2 = ((float)entityLiving.deathTime + partialTicks - 1.0F) / 20.0F * 1.6F;
f2 = MathHelper.sqrt_float(f2);
if (f2 > 1.0F)
{
f2 = 1.0F;
}
GlStateManager.rotate(f2 * this.getDeathMaxRotation(entityLiving), 0.0F, 0.0F, 1.0F);
}
}