public override bool Func_48135_b(EntityAnimal par1EntityAnimal) { if (par1EntityAnimal == this) { return(false); } if (!IsTamed()) { return(false); } if (!(par1EntityAnimal is EntityWolf)) { return(false); } EntityWolf entitywolf = (EntityWolf)par1EntityAnimal; if (!entitywolf.IsTamed()) { return(false); } if (entitywolf.IsSitting()) { return(false); } else { return(IsInLove() && entitywolf.IsInLove()); } }
/// <summary> /// 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. /// </summary> public override void SetLivingAnimations(EntityLiving par1EntityLiving, float par2, float par3, float par4) { EntityWolf entitywolf = (EntityWolf)par1EntityLiving; if (entitywolf.IsAngry()) { WolfTail.RotateAngleY = 0.0F; } else { WolfTail.RotateAngleY = MathHelper2.Cos(par2 * 0.6662F) * 1.4F * par3; } if (entitywolf.IsSitting()) { WolfMane.SetRotationPoint(-1F, 16F, -3F); WolfMane.RotateAngleX = ((float)Math.PI * 2F / 5F); WolfMane.RotateAngleY = 0.0F; WolfBody.SetRotationPoint(0.0F, 18F, 0.0F); WolfBody.RotateAngleX = ((float)Math.PI / 4F); WolfTail.SetRotationPoint(-1F, 21F, 6F); WolfLeg1.SetRotationPoint(-2.5F, 22F, 2.0F); WolfLeg1.RotateAngleX = ((float)Math.PI * 3F / 2F); WolfLeg2.SetRotationPoint(0.5F, 22F, 2.0F); WolfLeg2.RotateAngleX = ((float)Math.PI * 3F / 2F); WolfLeg3.RotateAngleX = 5.811947F; WolfLeg3.SetRotationPoint(-2.49F, 17F, -4F); WolfLeg4.RotateAngleX = 5.811947F; WolfLeg4.SetRotationPoint(0.51F, 17F, -4F); } else { WolfBody.SetRotationPoint(0.0F, 14F, 2.0F); WolfBody.RotateAngleX = ((float)Math.PI / 2F); WolfMane.SetRotationPoint(-1F, 14F, -3F); WolfMane.RotateAngleX = WolfBody.RotateAngleX; WolfTail.SetRotationPoint(-1F, 12F, 8F); WolfLeg1.SetRotationPoint(-2.5F, 16F, 7F); WolfLeg2.SetRotationPoint(0.5F, 16F, 7F); WolfLeg3.SetRotationPoint(-2.5F, 16F, -4F); WolfLeg4.SetRotationPoint(0.5F, 16F, -4F); WolfLeg1.RotateAngleX = MathHelper2.Cos(par2 * 0.6662F) * 1.4F * par3; WolfLeg2.RotateAngleX = MathHelper2.Cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3; WolfLeg3.RotateAngleX = MathHelper2.Cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3; WolfLeg4.RotateAngleX = MathHelper2.Cos(par2 * 0.6662F) * 1.4F * par3; } WolfHeadMain.RotateAngleZ = entitywolf.GetInterestedAngle(par4) + entitywolf.GetShakeAngle(par4, 0.0F); WolfMane.RotateAngleZ = entitywolf.GetShakeAngle(par4, -0.08F); WolfBody.RotateAngleZ = entitywolf.GetShakeAngle(par4, -0.16F); WolfTail.RotateAngleZ = entitywolf.GetShakeAngle(par4, -0.2F); if (entitywolf.GetWolfShaking()) { float f = entitywolf.GetBrightness(par4) * entitywolf.GetShadingWhileShaking(par4); //GL.Color3(f, f, f); } }