if(--spawnDelay <= 0){
spawnDelay = 500;
// Utility.Debug(townName + " spawner triggered");
// Choose citizen type to spawn (default wanderer or wife)
EntityCitizen newGuy;
if(isLessFemales()){
newGuy = new EntityWife(worldObj);
}
else{
newGuy = new EntityCitizen(worldObj);
}
newGuy.giveName();
// pick a random direction at the town perimeter
Point p = new Point(this.xCoord, this.yCoord, this.zCoord);
Point q = new Point();
Utility.Debug(p.toString());
q.polarTranslation(Utility.rng.nextRadian(), (float)(Math.PI/2.2), 14d);
p.plus(q);
this.terrainAdjustment(p);
// spawn mob
newGuy.setLocationAndAngles(Math.floor(p.x), Math.floor(p.y), Math.floor(p.z), Utility.rng.nextFloat()*360.0f, 0.0f);
worldObj.spawnEntityInWorld(newGuy);
}
/*
// Load/Save