Improve No Biomes crash, and don't register Spatial if spatial is disabled.
This commit is contained in:
parent
6084ac4e80
commit
d7ca8e519a
1 changed files with 8 additions and 1 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue