// Correct speed
if (housing.getWorld().rand.nextInt(100) >= chance)
return null;
int[] areaAr = genome.getTerritory();
Vect area = new Vect(areaAr[0], areaAr[1], areaAr[2]).multiply(housing.getTerritoryModifier(genome, 1f)).multiply(3.0f);
Vect offset = new Vect(-Math.round(area.x / 2), -Math.round(area.y / 2), -Math.round(area.z / 2));
if (area.x < 1)
area.x = 1;
if (area.y < 1)
area.y = 1;
if (area.z < 1)
area.z = 1;
// We have up to ten attempts
for (int i = 0; i < 20; i++) {
Vect randomPos = new Vect(housing.getWorld().rand.nextInt(area.x), housing.getWorld().rand.nextInt(area.y), housing.getWorld().rand.nextInt(area.z));
Vect posBlock = randomPos.add(new Vect(housing.getXCoord(), housing.getYCoord(), housing.getZCoord()));
posBlock = posBlock.add(offset);
TileEntity tile = housing.getWorld().getTileEntity(posBlock.x, posBlock.y, posBlock.z);
if (!(tile instanceof IPollinatable)) {
if (housing.getWorld().isAirBlock(posBlock.x, posBlock.y, posBlock.z))
continue;