allow swamp biome types to override river types

This commit is contained in:
dags- 2020-02-28 23:29:21 +00:00
parent 1c1ef12853
commit aad26e0c75

View File

@ -138,6 +138,10 @@ public class BiomeProvider extends AbstractBiomeProvider {
public Biome getBiome(Cell<Terrain> cell, int x, int z) {
if (cell.value <= context.levels.water) {
if (cell.tag == context.terrain.river || cell.tag == context.terrain.riverBanks) {
Biome biome = getBiome(cell);
if (biome.getCategory() == Biome.Category.SWAMP) {
return biome;
}
return biomeMap.getRiver(cell.temperature, cell.moisture, cell.biome);
} else if (cell.tag == context.terrain.ocean) {
return biomeMap.getOcean(cell.temperature, cell.moisture, cell.biome);