Fixed a crash with disabling river gen
This commit is contained in:
parent
601c509a68
commit
384abcec96
1 changed files with 10 additions and 6 deletions
|
@ -76,12 +76,16 @@ public class GenLayerRiverMixBOP extends BOPGenLayer
|
||||||
|
|
||||||
private boolean biomeSupportsRivers(int biomeId)
|
private boolean biomeSupportsRivers(int biomeId)
|
||||||
{
|
{
|
||||||
BiomeGenBase biome = BiomeGenBase.getBiome(biomeId);
|
//Check if the biome id is valid
|
||||||
|
if (biomeId >= 0 && biomeId <= BiomeGenBase.getBiomeGenArray().length)
|
||||||
if (biome != null && biome instanceof BOPBiome)
|
|
||||||
{
|
{
|
||||||
BOPBiome bopBiome = (BOPBiome)biome;
|
BiomeGenBase biome = BiomeGenBase.getBiome(biomeId);
|
||||||
return bopBiome.canGenerateRivers;
|
|
||||||
|
if (biome != null && biome instanceof BOPBiome)
|
||||||
|
{
|
||||||
|
BOPBiome bopBiome = (BOPBiome)biome;
|
||||||
|
return bopBiome.canGenerateRivers;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue