From aad26e0c755f649b8bcd500f5e6ce213bfc6ce40 Mon Sep 17 00:00:00 2001 From: dags- Date: Fri, 28 Feb 2020 23:29:21 +0000 Subject: [PATCH] allow swamp biome types to override river types --- .../com/terraforged/mod/biome/provider/BiomeProvider.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/biome/provider/BiomeProvider.java b/TerraForgedMod/src/main/java/com/terraforged/mod/biome/provider/BiomeProvider.java index 2c46003..7a001e5 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/biome/provider/BiomeProvider.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/biome/provider/BiomeProvider.java @@ -138,6 +138,10 @@ public class BiomeProvider extends AbstractBiomeProvider { public Biome getBiome(Cell 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);