Added two utility functions.

This commit is contained in:
Harrison Deng 2020-04-24 15:09:16 -05:00
parent ffc01f0ddf
commit 2d9163f5c2

View File

@ -172,6 +172,14 @@ public class BiomeSelector {
return Biome.BEACH;
}
public boolean isOceanBiome(Biome biome) {
return oceans.containsKey(biome);
}
public boolean isLandBiome(Biome biome) {
return !isOceanBiome(biome);
}
/**
* Randomly selects a land biome that fits in given temperature.
* @param temperature Minecraft temperature to select biome from.