Fixed biome registration not occurring on first run

This commit is contained in:
Adubbz 2015-04-07 11:31:05 +10:00
parent 981ccdc2ca
commit 587a34337d

View file

@ -71,6 +71,13 @@ public class JsonBiome
biome.weights = extendedBiome.getWeightMap(); biome.weights = extendedBiome.getWeightMap();
biome.decoration = generationManager.createGeneratorMap(); biome.decoration = generationManager.createGeneratorMap();
if (extendedBiome.getBiomeOwner() == BiomeOwner.BIOMESOPLENTY)
{
//Add the biome to the array if it is ours because the registration in configureBiomeWithJson is
//not called on the first run
BiomeGenBase.getBiomeGenArray()[baseBiome.biomeID] = baseBiome;
}
//TODO: Add a system for making Vanilla biome weights configurable. This won't necessarily be in this class, however it's worth noting. //TODO: Add a system for making Vanilla biome weights configurable. This won't necessarily be in this class, however it's worth noting.
for (Entry<BiomeType, Integer> entry : extendedBiome.getWeightMap().entrySet()) for (Entry<BiomeType, Integer> entry : extendedBiome.getWeightMap().entrySet())
{ {