Improve No Biomes crash, and don't register Spatial if spatial is disabled.

This commit is contained in:
AlgorithmX2 2014-06-17 16:46:01 -05:00
parent 6084ac4e80
commit d7ca8e519a

View file

@ -637,13 +637,20 @@ public class Registration
private void registerSpatial(boolean force) private void registerSpatial(boolean force)
{ {
if ( ! AEConfig.instance.isFeatureEnabled( AEFeature.SpatialIO ) )
return;
AEConfig config = AEConfig.instance; AEConfig config = AEConfig.instance;
if ( storageBiome == null ) if ( storageBiome == null )
{ {
if ( force && config.storageBiomeID == -1 ) if ( force && config.storageBiomeID == -1 )
{ {
storageBiome = new BiomeGenStorage( config.storageBiomeID = Platform.findEmpty( BiomeGenBase.getBiomeGenArray() ) ); config.storageBiomeID = Platform.findEmpty( BiomeGenBase.getBiomeGenArray() );
if ( config.storageBiomeID == -1 )
throw new RuntimeException("Biome Array is full, please free up some Biome ID's or disable spatial.");
storageBiome = new BiomeGenStorage( config.storageBiomeID );
config.save(); config.save();
} }