本文整理汇总了Java中net.minecraft.entity.passive.EntityBat.getIsBatHanging方法的典型用法代码示例。如果您正苦于以下问题:Java EntityBat.getIsBatHanging方法的具体用法?Java EntityBat.getIsBatHanging怎么用?Java EntityBat.getIsBatHanging使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.passive.EntityBat
的用法示例。
在下文中一共展示了EntityBat.getIsBatHanging方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: rotateCorpse
import net.minecraft.entity.passive.EntityBat; //导入方法依赖的package包/类
protected void rotateCorpse(EntityBat bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{
if (!bat.getIsBatHanging())
{
GlStateManager.translate(0.0F, MathHelper.cos(p_77043_2_ * 0.3F) * 0.1F, 0.0F);
}
else
{
GlStateManager.translate(0.0F, -0.1F, 0.0F);
}
super.rotateCorpse(bat, p_77043_2_, p_77043_3_, partialTicks);
}
示例2: rotateCorpse
import net.minecraft.entity.passive.EntityBat; //导入方法依赖的package包/类
protected void rotateCorpse(EntityBat entityLiving, float p_77043_2_, float p_77043_3_, float partialTicks)
{
if (entityLiving.getIsBatHanging())
{
GlStateManager.translate(0.0F, -0.1F, 0.0F);
}
else
{
GlStateManager.translate(0.0F, MathHelper.cos(p_77043_2_ * 0.3F) * 0.1F, 0.0F);
}
super.rotateCorpse(entityLiving, p_77043_2_, p_77043_3_, partialTicks);
}
示例3: rotateCorpse
import net.minecraft.entity.passive.EntityBat; //导入方法依赖的package包/类
protected void rotateCorpse(EntityBat par1EntityBat, float par2, float par3, float par4)
{
if (!par1EntityBat.getIsBatHanging())
{
GL11.glTranslatef(0.0F, MathHelper.cos(par2 * 0.3F) * 0.1F, 0.0F);
}
else
{
GL11.glTranslatef(0.0F, -0.1F, 0.0F);
}
super.rotateCorpse(par1EntityBat, par2, par3, par4);
}
示例4: rotateCorpse
import net.minecraft.entity.passive.EntityBat; //导入方法依赖的package包/类
protected void rotateCorpse(EntityBat p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_)
{
if (!p_77043_1_.getIsBatHanging())
{
GL11.glTranslatef(0.0F, MathHelper.cos(p_77043_2_ * 0.3F) * 0.1F, 0.0F);
}
else
{
GL11.glTranslatef(0.0F, -0.1F, 0.0F);
}
super.rotateCorpse(p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_);
}
示例5: func_82444_a
import net.minecraft.entity.passive.EntityBat; //导入方法依赖的package包/类
protected void func_82444_a(EntityBat par1EntityBat, float par2, float par3, float par4)
{
if (!par1EntityBat.getIsBatHanging())
{
GL11.glTranslatef(0.0F, MathHelper.cos(par2 * 0.3F) * 0.1F, 0.0F);
}
else
{
GL11.glTranslatef(0.0F, -0.1F, 0.0F);
}
super.rotateCorpse(par1EntityBat, par2, par3, par4);
}
示例6: getHeadYaw
import net.minecraft.entity.passive.EntityBat; //导入方法依赖的package包/类
@Override
public float getHeadYaw(EntityBat living, float partialTick, int eye)
{
if(living.getIsBatHanging())
{
return -super.getHeadYaw(living, partialTick, eye);
}
else
{
return super.getHeadYaw(living, partialTick, eye);
}
}
示例7: render
import net.minecraft.entity.passive.EntityBat; //导入方法依赖的package包/类
/**
* Sets the models various rotation angles then renders the model.
*/
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
{
EntityBat var8 = (EntityBat)par1Entity;
float var9;
if (var8.getIsBatHanging())
{
var9 = (180F / (float)Math.PI);
this.batHead.rotateAngleX = par6 / (180F / (float)Math.PI);
this.batHead.rotateAngleY = (float)Math.PI - par5 / (180F / (float)Math.PI);
this.batHead.rotateAngleZ = (float)Math.PI;
this.batHead.setRotationPoint(0.0F, -2.0F, 0.0F);
this.batRightWing.setRotationPoint(-3.0F, 0.0F, 3.0F);
this.batLeftWing.setRotationPoint(3.0F, 0.0F, 3.0F);
this.batBody.rotateAngleX = (float)Math.PI;
this.batRightWing.rotateAngleX = -0.15707964F;
this.batRightWing.rotateAngleY = -((float)Math.PI * 2F / 5F);
this.batOuterRightWing.rotateAngleY = -1.7278761F;
this.batLeftWing.rotateAngleX = this.batRightWing.rotateAngleX;
this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY;
this.batOuterLeftWing.rotateAngleY = -this.batOuterRightWing.rotateAngleY;
}
else
{
var9 = (180F / (float)Math.PI);
this.batHead.rotateAngleX = par6 / (180F / (float)Math.PI);
this.batHead.rotateAngleY = par5 / (180F / (float)Math.PI);
this.batHead.rotateAngleZ = 0.0F;
this.batHead.setRotationPoint(0.0F, 0.0F, 0.0F);
this.batRightWing.setRotationPoint(0.0F, 0.0F, 0.0F);
this.batLeftWing.setRotationPoint(0.0F, 0.0F, 0.0F);
this.batBody.rotateAngleX = ((float)Math.PI / 4F) + MathHelper.cos(par4 * 0.1F) * 0.15F;
this.batBody.rotateAngleY = 0.0F;
this.batRightWing.rotateAngleY = MathHelper.cos(par4 * 1.3F) * (float)Math.PI * 0.25F;
this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY;
this.batOuterRightWing.rotateAngleY = this.batRightWing.rotateAngleY * 0.5F;
this.batOuterLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY * 0.5F;
}
this.batHead.render(par7);
this.batBody.render(par7);
}
示例8: render
import net.minecraft.entity.passive.EntityBat; //导入方法依赖的package包/类
public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_)
{
EntityBat entitybat = (EntityBat)p_78088_1_;
float f6;
if (entitybat.getIsBatHanging())
{
f6 = (180F / (float)Math.PI);
this.batHead.rotateAngleX = p_78088_6_ / (180F / (float)Math.PI);
this.batHead.rotateAngleY = (float)Math.PI - p_78088_5_ / (180F / (float)Math.PI);
this.batHead.rotateAngleZ = (float)Math.PI;
this.batHead.setRotationPoint(0.0F, -2.0F, 0.0F);
this.batRightWing.setRotationPoint(-3.0F, 0.0F, 3.0F);
this.batLeftWing.setRotationPoint(3.0F, 0.0F, 3.0F);
this.batBody.rotateAngleX = (float)Math.PI;
this.batRightWing.rotateAngleX = -0.15707964F;
this.batRightWing.rotateAngleY = -((float)Math.PI * 2F / 5F);
this.batOuterRightWing.rotateAngleY = -1.7278761F;
this.batLeftWing.rotateAngleX = this.batRightWing.rotateAngleX;
this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY;
this.batOuterLeftWing.rotateAngleY = -this.batOuterRightWing.rotateAngleY;
}
else
{
f6 = (180F / (float)Math.PI);
this.batHead.rotateAngleX = p_78088_6_ / (180F / (float)Math.PI);
this.batHead.rotateAngleY = p_78088_5_ / (180F / (float)Math.PI);
this.batHead.rotateAngleZ = 0.0F;
this.batHead.setRotationPoint(0.0F, 0.0F, 0.0F);
this.batRightWing.setRotationPoint(0.0F, 0.0F, 0.0F);
this.batLeftWing.setRotationPoint(0.0F, 0.0F, 0.0F);
this.batBody.rotateAngleX = ((float)Math.PI / 4F) + MathHelper.cos(p_78088_4_ * 0.1F) * 0.15F;
this.batBody.rotateAngleY = 0.0F;
this.batRightWing.rotateAngleY = MathHelper.cos(p_78088_4_ * 1.3F) * (float)Math.PI * 0.25F;
this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY;
this.batOuterRightWing.rotateAngleY = this.batRightWing.rotateAngleY * 0.5F;
this.batOuterLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY * 0.5F;
}
this.batHead.render(p_78088_7_);
this.batBody.render(p_78088_7_);
}
示例9: render
import net.minecraft.entity.passive.EntityBat; //导入方法依赖的package包/类
/**
* Sets the models various rotation angles then renders the model.
*/
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
{
EntityBat entitybat = (EntityBat)par1Entity;
float f6;
if (entitybat.getIsBatHanging())
{
f6 = (180F / (float)Math.PI);
this.batHead.rotateAngleX = par6 / (180F / (float)Math.PI);
this.batHead.rotateAngleY = (float)Math.PI - par5 / (180F / (float)Math.PI);
this.batHead.rotateAngleZ = (float)Math.PI;
this.batHead.setRotationPoint(0.0F, -2.0F, 0.0F);
this.batRightWing.setRotationPoint(-3.0F, 0.0F, 3.0F);
this.batLeftWing.setRotationPoint(3.0F, 0.0F, 3.0F);
this.batBody.rotateAngleX = (float)Math.PI;
this.batRightWing.rotateAngleX = -0.15707964F;
this.batRightWing.rotateAngleY = -((float)Math.PI * 2F / 5F);
this.batOuterRightWing.rotateAngleY = -1.7278761F;
this.batLeftWing.rotateAngleX = this.batRightWing.rotateAngleX;
this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY;
this.batOuterLeftWing.rotateAngleY = -this.batOuterRightWing.rotateAngleY;
}
else
{
f6 = (180F / (float)Math.PI);
this.batHead.rotateAngleX = par6 / (180F / (float)Math.PI);
this.batHead.rotateAngleY = par5 / (180F / (float)Math.PI);
this.batHead.rotateAngleZ = 0.0F;
this.batHead.setRotationPoint(0.0F, 0.0F, 0.0F);
this.batRightWing.setRotationPoint(0.0F, 0.0F, 0.0F);
this.batLeftWing.setRotationPoint(0.0F, 0.0F, 0.0F);
this.batBody.rotateAngleX = ((float)Math.PI / 4F) + MathHelper.cos(par4 * 0.1F) * 0.15F;
this.batBody.rotateAngleY = 0.0F;
this.batRightWing.rotateAngleY = MathHelper.cos(par4 * 1.3F) * (float)Math.PI * 0.25F;
this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY;
this.batOuterRightWing.rotateAngleY = this.batRightWing.rotateAngleY * 0.5F;
this.batOuterLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY * 0.5F;
}
this.batHead.render(par7);
this.batBody.render(par7);
}