Fixed so the Nether will not be overridden on Default Worlds without the

Add to Default set to true.
This commit is contained in:
Amnet 2013-08-10 12:42:36 +02:00
parent 6a8893e75b
commit 16af6545b9
2 changed files with 23 additions and 5 deletions

View file

@ -109,11 +109,11 @@ public class BiomesOPlenty
proxy.registerRenderers();
if (BOPConfiguration.TerrainGen.netherOverride)
{
DimensionManager.unregisterProviderType(-1);
DimensionManager.registerProviderType(-1, WorldProviderBOPhell.class, true);
}
// if (BOPConfiguration.TerrainGen.netherOverride)
// {
// DimensionManager.unregisterProviderType(-1);
// DimensionManager.registerProviderType(-1, WorldProviderBOPhell.class, true);
// }
DimensionManager.registerProviderType(BOPConfiguration.IDs.promisedLandDimID, WorldProviderPromised.class, false);
DimensionManager.registerDimension(BOPConfiguration.IDs.promisedLandDimID, BOPConfiguration.IDs.promisedLandDimID);

View file

@ -1,5 +1,7 @@
package biomesoplenty.world;
import net.minecraft.world.WorldProviderHell;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.terraingen.WorldTypeEvent;
import biomesoplenty.configuration.BOPConfiguration;
@ -11,6 +13,22 @@ public class WorldTypeSize
{
if (event.worldType.getWorldTypeName() == "BIOMESOP") {
event.newSize = (byte)BOPConfiguration.TerrainGen.biomeSize;
if (BOPConfiguration.TerrainGen.netherOverride)
{
DimensionManager.unregisterProviderType(-1);
DimensionManager.registerProviderType(-1, WorldProviderBOPhell.class, true);
}
}
else if (BOPConfiguration.TerrainGen.netherOverride && BOPConfiguration.TerrainGen.addToDefault)
{
DimensionManager.unregisterProviderType(-1);
DimensionManager.registerProviderType(-1, WorldProviderBOPhell.class, true);
}
else
{
DimensionManager.unregisterProviderType(-1);
DimensionManager.registerProviderType(-1, WorldProviderHell.class, true);
}
}