biomesToSearch.removeAll(excludedBiomes);
// If we are in a valid biome, we point to ourself.
BiomeGenBase biome = world.getBiomeGenForCoords((int) player.posX, (int) player.posZ);
if (biomesToSearch.contains(biome.biomeID)) {
Proxies.common.setBiomefinderCoordinates(player, new ChunkCoordinates((int) player.posX, (int) player.posY, (int) player.posZ));
return;
}
if (Proxies.common.isSimulating(world) && biomesToSearch.size() > 0) {
ChunkCoordinates target = findNearestBiome(player, biomesToSearch);
Proxies.common.setBiomefinderCoordinates(player, target);
}
}