diff --git a/src/minecraft/biomesoplenty/api/Biomes.java b/src/minecraft/biomesoplenty/api/Biomes.java index d997a2145..6be95105e 100644 --- a/src/minecraft/biomesoplenty/api/Biomes.java +++ b/src/minecraft/biomesoplenty/api/Biomes.java @@ -1,5 +1,7 @@ package biomesoplenty.api; +import java.util.ArrayList; + import net.minecraft.world.biome.BiomeGenBase; import com.google.common.base.Optional; @@ -11,10 +13,10 @@ public class Biomes public static Optional badlands = Optional.absent(); public static Optional bambooForest = Optional.absent(); public static Optional bayou = Optional.absent(); - + public static Optional beachGravel = Optional.absent(); public static Optional beachOvergrown = Optional.absent(); - + public static Optional birchForest = Optional.absent(); public static Optional bog = Optional.absent(); public static Optional borealForest = Optional.absent(); @@ -54,18 +56,18 @@ public class Biomes public static Optional moor = Optional.absent(); public static Optional mountain = Optional.absent(); public static Optional mysticGrove = Optional.absent(); - + public static Optional netherBase = Optional.absent(); public static Optional netherGarden = Optional.absent(); public static Optional netherDesert = Optional.absent(); public static Optional netherLava = Optional.absent(); public static Optional netherBone = Optional.absent(); - + public static Optional oasis = Optional.absent(); - + public static Optional oceanCoral = Optional.absent(); public static Optional oceanKelp = Optional.absent(); - + public static Optional ominousWoods = Optional.absent(); public static Optional orchard = Optional.absent(); public static Optional originValley = Optional.absent(); @@ -73,11 +75,11 @@ public class Biomes public static Optional pasture = Optional.absent(); public static Optional polar = Optional.absent(); public static Optional prairie = Optional.absent(); - + public static Optional promisedLandForest = Optional.absent(); public static Optional promisedLandPlains = Optional.absent(); public static Optional promisedLandSwamp = Optional.absent(); - + public static Optional quagmire = Optional.absent(); public static Optional rainforest = Optional.absent(); public static Optional redwoodForest = Optional.absent(); @@ -101,7 +103,7 @@ public class Biomes public static Optional wasteland = Optional.absent(); public static Optional wetland = Optional.absent(); public static Optional woodland = Optional.absent(); - + public static Optional plainsNew = Optional.absent(); public static Optional desertNew = Optional.absent(); public static Optional extremeHillsNew = Optional.absent(); @@ -109,4 +111,9 @@ public class Biomes public static Optional taigaNew = Optional.absent(); public static Optional swamplandNew = Optional.absent(); public static Optional jungleNew = Optional.absent(); + + /** + * Add any biomes you wish to spawn in the Nether + */ + public static ArrayList netherBiomes = new ArrayList(); } diff --git a/src/minecraft/biomesoplenty/world/WorldProviderBOPhell.java b/src/minecraft/biomesoplenty/world/WorldProviderBOPhell.java index 98d19825f..97ddb9f67 100644 --- a/src/minecraft/biomesoplenty/world/WorldProviderBOPhell.java +++ b/src/minecraft/biomesoplenty/world/WorldProviderBOPhell.java @@ -1,85 +1,25 @@ package biomesoplenty.world; -import net.minecraft.util.Vec3; -import net.minecraft.world.WorldProvider; +import net.minecraft.world.WorldProviderHell; import net.minecraft.world.chunk.IChunkProvider; import biomesoplenty.api.Biomes; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -public class WorldProviderBOPhell extends WorldProvider +public class WorldProviderBOPhell extends WorldProviderHell { - @Override - public void registerWorldChunkManager() - { + public void registerWorldChunkManager() + { if (Biomes.netherGarden.isPresent() || Biomes.netherDesert.isPresent() || Biomes.netherLava.isPresent() || Biomes.netherBone.isPresent()) { - worldChunkMgr = new WorldChunkManagerBOPhell(worldObj); + this.worldChunkMgr = new WorldChunkManagerBOPhell(worldObj); } - isHellWorld = true; - hasNoSky = true; - dimensionId = -1; - } - - @Override - @SideOnly(Side.CLIENT) - public Vec3 getFogColor(float par1, float par2) - { - return worldObj.getWorldVec3Pool().getVecFromPool(0.20000000298023224D, 0.029999999329447746D, 0.029999999329447746D); - } - - @Override - protected void generateLightBrightnessTable() - { - float f = 0.1F; - - for (int i = 0; i <= 15; ++i) - { - float f1 = 1.0F - i / 15.0F; - lightBrightnessTable[i] = (1.0F - f1) / (f1 * 3.0F + 1.0F) * (1.0F - f) + f; - } - } - - @Override - public boolean isSurfaceWorld() - { - return false; - } - - @Override - public boolean canCoordinateBeSpawn(int par1, int par2) - { - return false; - } - - @Override - public float calculateCelestialAngle(long par1, float par3) - { - return 0.5F; - } - - @Override - public boolean canRespawnHere() - { - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public boolean doesXZShowFog(int par1, int par2) - { - return true; - } - - @Override - public String getDimensionName() - { - return "Nether"; - } + this.isHellWorld = true; + this.hasNoSky = true; + this.dimensionId = -1; + } @Override public IChunkProvider createChunkGenerator() { - return new ChunkProviderBOPhell(worldObj, worldObj.getSeed()); + return new ChunkProviderBOPhell(this.worldObj, this.worldObj.getSeed()); } } \ No newline at end of file diff --git a/src/minecraft/biomesoplenty/world/layer/BiomeLayerBiomes.java b/src/minecraft/biomesoplenty/world/layer/BiomeLayerBiomes.java index f8e4dd21c..2a259a323 100644 --- a/src/minecraft/biomesoplenty/world/layer/BiomeLayerBiomes.java +++ b/src/minecraft/biomesoplenty/world/layer/BiomeLayerBiomes.java @@ -9,22 +9,22 @@ import biomesoplenty.api.Biomes; public class BiomeLayerBiomes extends BiomeLayer { - private int dimension = 0; - + private int dimension = 0; + private BiomeGenBase[] surfaceBiomes; private static ArrayList oceanBiomes = new ArrayList(); private static ArrayList netherBiomes = new ArrayList(); private static ArrayList promisedBiomes = new ArrayList(); - - public BiomeLayerBiomes(long par1, BiomeLayer par3GenLayer, WorldType par4WorldType, int dim) - { - super(par1); + + public BiomeLayerBiomes(long par1, BiomeLayer par3GenLayer, WorldType par4WorldType, int dim) + { + super(par1); parent = par3GenLayer; dimension = dim; - + //SURFACE BIOMES surfaceBiomes = par4WorldType.getBiomesForWorldType(); - + //OCEAN BIOMES oceanBiomes.add(BiomeGenBase.ocean); if (Biomes.oceanCoral.isPresent()) @@ -57,7 +57,11 @@ public class BiomeLayerBiomes extends BiomeLayer { netherBiomes.add(Biomes.netherBone.get()); } - + if (Biomes.netherBiomes.size() > 0) + { + netherBiomes.addAll(Biomes.netherBiomes); + } + //PROMISED BIOMES if (Biomes.promisedLandForest.isPresent()) { @@ -71,34 +75,33 @@ public class BiomeLayerBiomes extends BiomeLayer { promisedBiomes.add(Biomes.promisedLandSwamp.get()); } - } + } - @Override - public int[] getInts(int par1, int par2, int par3, int par4) - { - int[] var5 = parent.getInts(par1, par2, par3, par4); - int[] var6 = IntCache.getIntCache(par3 * par4); - - boolean coral = Biomes.oceanCoral.isPresent(); - boolean kelp = Biomes.oceanKelp.isPresent(); - - for (int var7 = 0; var7 < par4; ++var7) - { - for (int var8 = 0; var8 < par3; ++var8) - { - this.initChunkSeed(var8 + par1, var7 + par2); - int var9 = var5[var8 + var7 * par3]; + public int[] getInts(int par1, int par2, int par3, int par4) + { + int[] var5 = this.parent.getInts(par1, par2, par3, par4); + int[] var6 = IntCache.getIntCache(par3 * par4); + + boolean coral = Biomes.oceanCoral.isPresent(); + boolean kelp = Biomes.oceanKelp.isPresent(); + + for (int var7 = 0; var7 < par4; ++var7) + { + for (int var8 = 0; var8 < par3; ++var8) + { + this.initChunkSeed((long)(var8 + par1), (long)(var7 + par2)); + int var9 = var5[var8 + var7 * par3]; if(dimension == 0) //SURFACE BIOMES { if (var9 == 0) { var6[var8 + var7 * par3] = 0; } - else + else { var6[var8 + var7 * par3] = surfaceBiomes[this.nextInt(surfaceBiomes.length)].biomeID; } - + if (coral) { if(var9 == Biomes.oceanCoral.get().biomeID) @@ -106,7 +109,7 @@ public class BiomeLayerBiomes extends BiomeLayer var6[var8 + var7 * par3] = oceanBiomes.get(this.nextInt(oceanBiomes.size())).biomeID; } } - + if (kelp) { if(var9 == Biomes.oceanKelp.get().biomeID) @@ -128,8 +131,8 @@ public class BiomeLayerBiomes extends BiomeLayer { var6[var8 + var7 * par3] = surfaceBiomes[this.nextInt(surfaceBiomes.length)].biomeID; } - } - } - return var6; - } + } + } + return var6; + } } \ No newline at end of file