/**
* Spawns a baby animal of the same type.
*/
private void spawnBaby() {
EntityAgeable baby = this.theAnimal.createChild(this.targetMate);
if(baby instanceof EntityAnimal) {
this.theAnimal.setGrowingAge(3600); // 6000
this.targetMate.setGrowingAge(3600); // 6000
this.theAnimal.resetInLove();
this.targetMate.resetInLove();
baby.setGrowingAge(-12000); // -24000
modifyAI((EntityAnimal)baby);
Random rand = this.theAnimal.getRNG();
if(baby instanceof EntityOcelot) {
EntityOcelot cat = (EntityOcelot)baby;
if(rand.nextInt(10) == 0) {
cat.setTameSkin(baby.worldObj.rand.nextInt(4));
}
}
double x = rand.nextGaussian() * 0.2D;
double z = rand.nextGaussian() * 0.2D;
baby.setLocationAndAngles(this.theAnimal.posX + x, this.theAnimal.posY, this.theAnimal.posZ + z, 0.0F, 0.0F);
this.theWorld.spawnEntityInWorld(baby);
for(int i = 0; i < 7; ++i) {
double px = rand.nextGaussian() * 0.02D;
double py = rand.nextGaussian() * 0.02D;