Fix null pointer exception in BiomeDictionary causing the ChunkManager's config to not load/save.
This commit is contained in:
parent
b0f8d495bb
commit
217d5562ff
1 changed files with 9 additions and 5 deletions
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue