Fix null pointer exception in BiomeDictionary causing the ChunkManager's config to not load/save.

This commit is contained in:
Lex Manos 2013-10-19 18:31:32 -07:00
parent b0f8d495bb
commit 217d5562ff

View file

@ -201,18 +201,22 @@ public class BiomeDictionary
*/ */
public static void registerAllBiomesAndGenerateEvents() public static void registerAllBiomesAndGenerateEvents()
{ {
for(int i = 0; i < BIOME_LIST_SIZE; i++) for(int i = 0; i < BiomeGenBase.biomeList.length; i++)
{ {
BiomeGenBase biome = BiomeGenBase.biomeList[i]; BiomeGenBase biome = BiomeGenBase.biomeList[i];
if(biome == null)
{
continue;
}
if (biome.theBiomeDecorator instanceof DeferredBiomeDecorator) if (biome.theBiomeDecorator instanceof DeferredBiomeDecorator)
{ {
DeferredBiomeDecorator decorator = (DeferredBiomeDecorator) biome.theBiomeDecorator; DeferredBiomeDecorator decorator = (DeferredBiomeDecorator) biome.theBiomeDecorator;
decorator.fireCreateEventAndReplace(); decorator.fireCreateEventAndReplace();
} }
if(biome != null)
{ checkRegistration(biome);
checkRegistration(biome);
}
} }
} }