Exemple #1
0
        public override bool Func_48135_b(EntityAnimal par1EntityAnimal)
        {
            if (par1EntityAnimal == this)
            {
                return(false);
            }

            if (!IsTamed())
            {
                return(false);
            }

            if (!(par1EntityAnimal is EntityOcelot))
            {
                return(false);
            }

            EntityOcelot entityocelot = (EntityOcelot)par1EntityAnimal;

            if (!entityocelot.IsTamed())
            {
                return(false);
            }
            else
            {
                return(IsInLove() && entityocelot.IsInLove());
            }
        }
Exemple #2
0
        protected virtual void Func_48423_a(EntityOcelot par1EntityOcelot, float par2)
        {
            base.PreRenderCallback(par1EntityOcelot, par2);

            if (par1EntityOcelot.IsTamed())
            {
                //GL.Scale(0.8F, 0.8F, 0.8F);
            }
        }
Exemple #3
0
        /// <summary>
        /// This function is used when two same-species animals in 'love mode' breed to generate the new baby animal.
        /// </summary>
        public override EntityAnimal SpawnBabyAnimal(EntityAnimal par1EntityAnimal)
        {
            EntityOcelot entityocelot = new EntityOcelot(WorldObj);

            if (IsTamed())
            {
                entityocelot.SetOwner(GetOwnerName());
                entityocelot.SetTamed(true);
                entityocelot.Func_48147_c(Func_48148_ad());
            }

            return(entityocelot);
        }
        private static bool Func_50075_j(World par0World, int par1, int par2, int par3)
        {
            for (IEnumerator <Entity> iterator = par0World.GetEntitiesWithinAABB(typeof(net.minecraft.src.EntityOcelot), AxisAlignedBB.GetBoundingBoxFromPool(par1, par2 + 1, par3, par1 + 1, par2 + 2, par3 + 1)).GetEnumerator(); iterator.MoveNext();)
            {
                Entity       entity       = iterator.Current;
                EntityOcelot entityocelot = (EntityOcelot)entity;

                if (entityocelot.IsSitting())
                {
                    return(true);
                }
            }

            return(false);
        }
Exemple #5
0
 /// <summary>
 /// determines if a skeleton spawns on a spider, and if a sheep is a different color
 /// </summary>
 private static void CreatureSpecificInit(EntityLiving par0EntityLiving, World par1World, float par2, float par3, float par4)
 {
     if ((par0EntityLiving is EntitySpider) && par1World.Rand.Next(100) == 0)
     {
         EntitySkeleton entityskeleton = new EntitySkeleton(par1World);
         entityskeleton.SetLocationAndAngles(par2, par3, par4, par0EntityLiving.RotationYaw, 0.0F);
         par1World.SpawnEntityInWorld(entityskeleton);
         entityskeleton.MountEntity(par0EntityLiving);
     }
     else if (par0EntityLiving is EntitySheep)
     {
         ((EntitySheep)par0EntityLiving).SetFleeceColor(EntitySheep.GetRandomFleeceColor(par1World.Rand));
     }
     else if ((par0EntityLiving is EntityOcelot) && par1World.Rand.Next(7) == 0)
     {
         for (int i = 0; i < 2; i++)
         {
             EntityOcelot entityocelot = new EntityOcelot(par1World);
             entityocelot.SetLocationAndAngles(par2, par3, par4, par0EntityLiving.RotationYaw, 0.0F);
             entityocelot.SetGrowingAge(-24000);
             par1World.SpawnEntityInWorld(entityocelot);
         }
     }
 }
        /// <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)
        {
            EntityOcelot entityocelot = (EntityOcelot)par1EntityLiving;

            Field_48226_n.RotationPointY = 12F;
            Field_48226_n.RotationPointZ = -10F;
            Field_48220_g.RotationPointY = 15F;
            Field_48220_g.RotationPointZ = -9F;
            Field_48222_e.RotationPointY = 15F;
            Field_48222_e.RotationPointZ = 8F;
            Field_48219_f.RotationPointY = 20F;
            Field_48219_f.RotationPointZ = 14F;
            Field_48224_c.RotationPointY = Field_48221_d.RotationPointY = 13.8F;
            Field_48224_c.RotationPointZ = Field_48221_d.RotationPointZ = -5F;
            Field_48225_a.RotationPointY = Field_48223_b.RotationPointY = 18F;
            Field_48225_a.RotationPointZ = Field_48223_b.RotationPointZ = 5F;
            Field_48222_e.RotateAngleX   = 0.9F;

            if (entityocelot.IsSneaking())
            {
                Field_48226_n.RotationPointY++;
                Field_48220_g.RotationPointY += 2.0F;
                Field_48222_e.RotationPointY++;
                Field_48219_f.RotationPointY += -4F;
                Field_48219_f.RotationPointZ += 2.0F;
                Field_48222_e.RotateAngleX    = ((float)Math.PI / 2F);
                Field_48219_f.RotateAngleX    = ((float)Math.PI / 2F);
                Field_48227_o = 0;
            }
            else if (entityocelot.IsSprinting())
            {
                Field_48219_f.RotationPointY  = Field_48222_e.RotationPointY;
                Field_48219_f.RotationPointZ += 2.0F;
                Field_48222_e.RotateAngleX    = ((float)Math.PI / 2F);
                Field_48219_f.RotateAngleX    = ((float)Math.PI / 2F);
                Field_48227_o = 2;
            }
            else if (entityocelot.IsSitting())
            {
                Field_48226_n.RotateAngleX    = ((float)Math.PI / 4F);
                Field_48226_n.RotationPointY += -4F;
                Field_48226_n.RotationPointZ += 5F;
                Field_48220_g.RotationPointY += -3.3F;
                Field_48220_g.RotationPointZ++;
                Field_48222_e.RotationPointY += 8F;
                Field_48222_e.RotationPointZ += -2F;
                Field_48219_f.RotationPointY += 2.0F;
                Field_48219_f.RotationPointZ += -0.8F;
                Field_48222_e.RotateAngleX    = 1.727876F;
                Field_48219_f.RotateAngleX    = 2.670354F;
                Field_48224_c.RotateAngleX    = Field_48221_d.RotateAngleX = -0.1570796F;
                Field_48224_c.RotationPointY  = Field_48221_d.RotationPointY = 15.8F;
                Field_48224_c.RotationPointZ  = Field_48221_d.RotationPointZ = -7F;
                Field_48225_a.RotateAngleX    = Field_48223_b.RotateAngleX = -((float)Math.PI / 2F);
                Field_48225_a.RotationPointY  = Field_48223_b.RotationPointY = 21F;
                Field_48225_a.RotationPointZ  = Field_48223_b.RotationPointZ = 1.0F;
                Field_48227_o = 3;
            }
            else
            {
                Field_48227_o = 1;
            }
        }
Exemple #7
0
 public virtual void Func_48424_a(EntityOcelot par1EntityOcelot, double par2, double par4, double par6, float par8, float par9)
 {
     base.DoRenderLiving(par1EntityOcelot, par2, par4, par6, par8, par9);
 }